Public Types | Public Member Functions | Public Attributes

jsdIScript Interface Reference

Script object. More...

import "jsdIDebuggerService.idl";

Inheritance diagram for jsdIScript:
Collaboration diagram for jsdIScript:

List of all members.

Public Types

enum  { FLAG_PROFILE = 1U }
 

FLAG_* values need to be kept in sync with JSD_SCRIPT_* defines in jsdebug.h.

More...
enum  { FLAG_DEBUG = 2U }
 

Determines whether or not to ignore breakpoints, etc.

More...
enum  { PCMAP_SOURCETEXT = 1U }
enum  { PCMAP_PRETTYPRINT = 2U }

Public Member Functions

virtual nsresult GetJSDContext (JSDContext **aJSDContext)=0
 Script object.
virtual nsresult GetJSDScript (JSDScript **aJSDScript)=0
 Internal use only.
virtual nsresult GetVersion (PRInt32 *aVersion)=0
 Last version set on this context.
virtual nsresult GetTag (PRUint32 *aTag)=0
 Tag value guaranteed unique among jsdIScript objects.
virtual nsresult GetFlags (PRUint32 *aFlags)=0
 FLAG_* attributes from above, OR'd together.
virtual nsresult SetFlags (PRUint32 aFlags)=0
virtual nsresult GetFileName (nsACString &aFileName)=0
 Filename given for this script when it was compiled.
virtual nsresult GetFunctionName (nsACString &aFunctionName)=0
 Function name for this script.
virtual nsresult GetParameterNames (PRUint32 *count, PRUnichar ***paramNames)=0
 The names of the arguments for this function; empty if this is not a function.
virtual nsresult GetFunctionObject (jsdIValue **aFunctionObject)=0
 Fetch the function object as a jsdIValue.
virtual nsresult GetFunctionSource (nsAString &aFunctionSource)=0
 Source code for this script, without function declaration.
virtual nsresult GetBaseLineNumber (PRUint32 *aBaseLineNumber)=0
 Line number in source file containing the first line of this script.
virtual nsresult GetLineExtent (PRUint32 *aLineExtent)=0
 Total number of lines in this script.
virtual nsresult GetCallCount (PRUint32 *aCallCount)=0
 Number of times this script has been called.
virtual nsresult GetMaxRecurseDepth (PRUint32 *aMaxRecurseDepth)=0
 Number of times this script called itself, directly or indirectly.
virtual nsresult GetMinExecutionTime (double *aMinExecutionTime)=0
 Shortest execution time recorded, in milliseconds.
virtual nsresult GetMaxExecutionTime (double *aMaxExecutionTime)=0
 Longest execution time recorded, in milliseconds.
virtual nsresult GetTotalExecutionTime (double *aTotalExecutionTime)=0
 Total time spent in this function, in milliseconds.
virtual nsresult GetMinOwnExecutionTime (double *aMinOwnExecutionTime)=0
 Shortest execution time recorded, in milliseconds, excluding time spent in other called code.
virtual nsresult GetMaxOwnExecutionTime (double *aMaxOwnExecutionTime)=0
 Longest execution time recorded, in milliseconds, excluding time spent in other called code.
virtual nsresult GetTotalOwnExecutionTime (double *aTotalOwnExecutionTime)=0
 Total time spent in this function, in milliseconds, excluding time spent in other called code.
virtual nsresult ClearProfileData (void)=0
 Clear profile data for this script.
virtual nsresult PcToLine (PRUint32 pc, PRUint32 pcmap, PRUint32 *_retval)=0
 Get the closest line number to a given PC.
virtual nsresult LineToPc (PRUint32 line, PRUint32 pcmap, PRUint32 *_retval)=0
 Get the first PC associated with a line.
virtual nsresult IsLineExecutable (PRUint32 line, PRUint32 pcmap, PRBool *_retval)=0
 Determine is a particular line is executable, like checking that lineToPc == pcToLine, except in one call.
virtual nsresult SetBreakpoint (PRUint32 pc)=0
 Set a breakpoint at a PC in this script.
virtual nsresult ClearBreakpoint (PRUint32 pc)=0
 Clear a breakpoint at a PC in this script.
virtual nsresult ClearAllBreakpoints (void)=0
 Clear all breakpoints set in this script.
void getParameterNames ([optional] out unsigned long count,[array, size_is(count), retval] out wstring paramNames)
 The names of the arguments for this function; empty if this is not a function.
void clearProfileData ()
 Clear profile data for this script.
unsigned long pcToLine (in unsigned long pc, in unsigned long pcmap)
 Get the closest line number to a given PC.
unsigned long lineToPc (in unsigned long line, in unsigned long pcmap)
 Get the first PC associated with a line.
boolean isLineExecutable (in unsigned long line, in unsigned long pcmap)
 Determine is a particular line is executable, like checking that lineToPc == pcToLine, except in one call.
void setBreakpoint (in unsigned long pc)
 Set a breakpoint at a PC in this script.
void clearBreakpoint (in unsigned long pc)
 Clear a breakpoint at a PC in this script.
void clearAllBreakpoints ()
 Clear all breakpoints set in this script.

Public Attributes

readonly attribute JSDContext JSDContext
 Internal use only.
readonly attribute JSDScript JSDScript
 Internal use only.
readonly attribute long version
 Last version set on this context.
readonly attribute unsigned long tag
 Tag value guaranteed unique among jsdIScript objects.
const unsigned long FLAG_PROFILE = 0x01
 FLAG_* values need to be kept in sync with JSD_SCRIPT_* defines in jsdebug.h.
const unsigned long FLAG_DEBUG = 0x02
 Determines whether or not to ignore breakpoints, etc.
attribute unsigned long flags
 FLAG_* attributes from above, OR'd together.
readonly attribute AUTF8String fileName
 Filename given for this script when it was compiled.
readonly attribute AUTF8String functionName
 Function name for this script.
readonly attribute jsdIValue functionObject
 Fetch the function object as a jsdIValue.
readonly attribute AString functionSource
 Source code for this script, without function declaration.
readonly attribute unsigned long baseLineNumber
 Line number in source file containing the first line of this script.
readonly attribute unsigned long lineExtent
 Total number of lines in this script.
readonly attribute unsigned long callCount
 Number of times this script has been called.
readonly attribute unsigned long maxRecurseDepth
 Number of times this script called itself, directly or indirectly.
readonly attribute double minExecutionTime
 Shortest execution time recorded, in milliseconds.
readonly attribute double maxExecutionTime
 Longest execution time recorded, in milliseconds.
readonly attribute double totalExecutionTime
 Total time spent in this function, in milliseconds.
readonly attribute double minOwnExecutionTime
 Shortest execution time recorded, in milliseconds, excluding time spent in other called code.
readonly attribute double maxOwnExecutionTime
 Longest execution time recorded, in milliseconds, excluding time spent in other called code.
readonly attribute double totalOwnExecutionTime
 Total time spent in this function, in milliseconds, excluding time spent in other called code.
const unsigned long PCMAP_SOURCETEXT = 1
const unsigned long PCMAP_PRETTYPRINT = 2

Detailed Description

Script object.

In JavaScript engine terms, there's a single script for each function, and one for the top level script.


Member Enumeration Documentation

anonymous enum

FLAG_* values need to be kept in sync with JSD_SCRIPT_* defines in jsdebug.h.

Determines whether or not to collect profile information for this script. The context flag FLAG_PROFILE_WHEN_SET decides the logic.

Enumerator:
FLAG_PROFILE 
anonymous enum

Determines whether or not to ignore breakpoints, etc.

in this script. The context flag JSD_DEBUG_WHEN_SET decides the logic.

Enumerator:
FLAG_DEBUG 
anonymous enum
Enumerator:
PCMAP_SOURCETEXT 
anonymous enum
Enumerator:
PCMAP_PRETTYPRINT 

Member Function Documentation

virtual nsresult jsdIScript::ClearAllBreakpoints ( void   )  [pure virtual]

Clear all breakpoints set in this script.

void jsdIScript::clearAllBreakpoints (  ) 

Clear all breakpoints set in this script.

void jsdIScript::clearBreakpoint ( in unsigned long  pc  ) 

Clear a breakpoint at a PC in this script.

virtual nsresult jsdIScript::ClearBreakpoint ( PRUint32  pc  )  [pure virtual]

Clear a breakpoint at a PC in this script.

virtual nsresult jsdIScript::ClearProfileData ( void   )  [pure virtual]

Clear profile data for this script.

void jsdIScript::clearProfileData (  ) 

Clear profile data for this script.

virtual nsresult jsdIScript::GetBaseLineNumber ( PRUint32 *  aBaseLineNumber  )  [pure virtual]

Line number in source file containing the first line of this script.

This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

virtual nsresult jsdIScript::GetCallCount ( PRUint32 *  aCallCount  )  [pure virtual]

Number of times this script has been called.

virtual nsresult jsdIScript::GetFileName ( nsACString aFileName  )  [pure virtual]

Filename given for this script when it was compiled.

This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

virtual nsresult jsdIScript::GetFlags ( PRUint32 *  aFlags  )  [pure virtual]

FLAG_* attributes from above, OR'd together.

virtual nsresult jsdIScript::GetFunctionName ( nsACString aFunctionName  )  [pure virtual]

Function name for this script.

"anonymous" for unnamed functions (or a function actually named anonymous), empty for top level scripts. This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

virtual nsresult jsdIScript::GetFunctionObject ( jsdIValue **  aFunctionObject  )  [pure virtual]

Fetch the function object as a jsdIValue.

virtual nsresult jsdIScript::GetFunctionSource ( nsAString aFunctionSource  )  [pure virtual]

Source code for this script, without function declaration.

virtual nsresult jsdIScript::GetJSDContext ( JSDContext **  aJSDContext  )  [pure virtual]

Script object.

In JavaScript engine terms, there's a single script for each function, and one for the top level script. Internal use only.

virtual nsresult jsdIScript::GetJSDScript ( JSDScript **  aJSDScript  )  [pure virtual]

Internal use only.

virtual nsresult jsdIScript::GetLineExtent ( PRUint32 *  aLineExtent  )  [pure virtual]

Total number of lines in this script.

This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

virtual nsresult jsdIScript::GetMaxExecutionTime ( double *  aMaxExecutionTime  )  [pure virtual]

Longest execution time recorded, in milliseconds.

virtual nsresult jsdIScript::GetMaxOwnExecutionTime ( double *  aMaxOwnExecutionTime  )  [pure virtual]

Longest execution time recorded, in milliseconds, excluding time spent in other called code.

virtual nsresult jsdIScript::GetMaxRecurseDepth ( PRUint32 *  aMaxRecurseDepth  )  [pure virtual]

Number of times this script called itself, directly or indirectly.

virtual nsresult jsdIScript::GetMinExecutionTime ( double *  aMinExecutionTime  )  [pure virtual]

Shortest execution time recorded, in milliseconds.

virtual nsresult jsdIScript::GetMinOwnExecutionTime ( double *  aMinOwnExecutionTime  )  [pure virtual]

Shortest execution time recorded, in milliseconds, excluding time spent in other called code.

virtual nsresult jsdIScript::GetParameterNames ( PRUint32 *  count,
PRUnichar ***  paramNames 
) [pure virtual]

The names of the arguments for this function; empty if this is not a function.

void jsdIScript::getParameterNames ( [optional] out unsigned long  count,
[array, size_is(count), retval] out wstring  paramNames 
)

The names of the arguments for this function; empty if this is not a function.

virtual nsresult jsdIScript::GetTag ( PRUint32 *  aTag  )  [pure virtual]

Tag value guaranteed unique among jsdIScript objects.

Useful as a hash key in script.

virtual nsresult jsdIScript::GetTotalExecutionTime ( double *  aTotalExecutionTime  )  [pure virtual]

Total time spent in this function, in milliseconds.

virtual nsresult jsdIScript::GetTotalOwnExecutionTime ( double *  aTotalOwnExecutionTime  )  [pure virtual]

Total time spent in this function, in milliseconds, excluding time spent in other called code.

virtual nsresult jsdIScript::GetVersion ( PRInt32 *  aVersion  )  [pure virtual]

Last version set on this context.

Scripts typically select this with the "language" attribute. See the VERSION_* consts on jsdIDebuggerService.

boolean jsdIScript::isLineExecutable ( in unsigned long  line,
in unsigned long  pcmap 
)

Determine is a particular line is executable, like checking that lineToPc == pcToLine, except in one call.

The |pcmap| argument specifies which pc to source line map to use.

virtual nsresult jsdIScript::IsLineExecutable ( PRUint32  line,
PRUint32  pcmap,
PRBool _retval 
) [pure virtual]

Determine is a particular line is executable, like checking that lineToPc == pcToLine, except in one call.

The |pcmap| argument specifies which pc to source line map to use.

virtual nsresult jsdIScript::LineToPc ( PRUint32  line,
PRUint32  pcmap,
PRUint32 *  _retval 
) [pure virtual]

Get the first PC associated with a line.

The |pcmap| argument specifies which pc to source line map to use.

unsigned long jsdIScript::lineToPc ( in unsigned long  line,
in unsigned long  pcmap 
)

Get the first PC associated with a line.

The |pcmap| argument specifies which pc to source line map to use.

virtual nsresult jsdIScript::PcToLine ( PRUint32  pc,
PRUint32  pcmap,
PRUint32 *  _retval 
) [pure virtual]

Get the closest line number to a given PC.

The |pcmap| argument specifies which pc to source line map to use.

unsigned long jsdIScript::pcToLine ( in unsigned long  pc,
in unsigned long  pcmap 
)

Get the closest line number to a given PC.

The |pcmap| argument specifies which pc to source line map to use.

virtual nsresult jsdIScript::SetBreakpoint ( PRUint32  pc  )  [pure virtual]

Set a breakpoint at a PC in this script.

void jsdIScript::setBreakpoint ( in unsigned long  pc  ) 

Set a breakpoint at a PC in this script.

virtual nsresult jsdIScript::SetFlags ( PRUint32  aFlags  )  [pure virtual]

Member Data Documentation

readonly attribute unsigned long jsdIScript::baseLineNumber

Line number in source file containing the first line of this script.

This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

readonly attribute unsigned long jsdIScript::callCount

Number of times this script has been called.

readonly attribute AUTF8String jsdIScript::fileName

Filename given for this script when it was compiled.

This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

const unsigned long jsdIScript::FLAG_DEBUG = 0x02

Determines whether or not to ignore breakpoints, etc.

in this script. The context flag JSD_DEBUG_WHEN_SET decides the logic.

const unsigned long jsdIScript::FLAG_PROFILE = 0x01

FLAG_* values need to be kept in sync with JSD_SCRIPT_* defines in jsdebug.h.

Determines whether or not to collect profile information for this script. The context flag FLAG_PROFILE_WHEN_SET decides the logic.

attribute unsigned long jsdIScript::flags

FLAG_* attributes from above, OR'd together.

readonly attribute AUTF8String jsdIScript::functionName

Function name for this script.

"anonymous" for unnamed functions (or a function actually named anonymous), empty for top level scripts. This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

Fetch the function object as a jsdIValue.

readonly attribute AString jsdIScript::functionSource

Source code for this script, without function declaration.

readonly attribute JSDContext jsdIScript::JSDContext

Internal use only.

readonly attribute JSDScript jsdIScript::JSDScript

Internal use only.

readonly attribute unsigned long jsdIScript::lineExtent

Total number of lines in this script.

This data is copied from the underlying structure when the jsdIScript instance is created and is therefore available even after the script is invalidated.

readonly attribute double jsdIScript::maxExecutionTime

Longest execution time recorded, in milliseconds.

readonly attribute double jsdIScript::maxOwnExecutionTime

Longest execution time recorded, in milliseconds, excluding time spent in other called code.

readonly attribute unsigned long jsdIScript::maxRecurseDepth

Number of times this script called itself, directly or indirectly.

readonly attribute double jsdIScript::minExecutionTime

Shortest execution time recorded, in milliseconds.

readonly attribute double jsdIScript::minOwnExecutionTime

Shortest execution time recorded, in milliseconds, excluding time spent in other called code.

const unsigned long jsdIScript::PCMAP_PRETTYPRINT = 2
const unsigned long jsdIScript::PCMAP_SOURCETEXT = 1
readonly attribute unsigned long jsdIScript::tag

Tag value guaranteed unique among jsdIScript objects.

Useful as a hash key in script.

readonly attribute double jsdIScript::totalExecutionTime

Total time spent in this function, in milliseconds.

readonly attribute double jsdIScript::totalOwnExecutionTime

Total time spent in this function, in milliseconds, excluding time spent in other called code.

readonly attribute long jsdIScript::version

Last version set on this context.

Scripts typically select this with the "language" attribute. See the VERSION_* consts on jsdIDebuggerService.


The documentation for this interface was generated from the following files: