jsdIScript

IID:a38f65ca-1dd1-11b2-95d5-ff2947e9c920
Inherits From:jsdIEphemeral

Constants

Determines whether or not to collect profile information for this script. The context flag FLAG_PROFILE_WHEN_SET decides the logic.
PRUint32 FLAG_PROFILE = 1
Determines whether or not to ignore breakpoints, etc. in this script. The context flag JSD_DEBUG_WHEN_SET decides the logic.
PRUint32 FLAG_DEBUG = 2
PRUint32 PCMAP_SOURCETEXT = 1
PRUint32 PCMAP_PRETTYPRINT = 2

Properties

readonly PRUint32 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 PRUint32 callCount

Number of times this script has been called.

readonly char* 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.

PRUint32 flags

FLAG_* attributes from above, OR'd together.

readonly char* 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.

readonly jsdIValue* functionObject

Fetch the function object as a jsdIValue.

readonly AString functionSource

Source code for this script, without function declaration.

readonly JSDContext* JSDContext

readonly JSDScript* JSDScript

readonly PRUint32 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 double maxExecutionTime

Longest execution time recorded, in milliseconds.

readonly double maxOwnExecutionTime

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

readonly PRUint32 maxRecurseDepth

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

readonly double minExecutionTime

Shortest execution time recorded, in milliseconds.

readonly double minOwnExecutionTime

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

readonly PRUint32 tag

Tag value guaranteed unique among jsdIScript objects. Useful as a hash key in script.

readonly double totalExecutionTime

Total time spent in this function, in milliseconds.

readonly double totalOwnExecutionTime

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

readonly PRInt32 version

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


Methods

void clearAllBreakpoints ( ) void clearBreakpoint ( PRUint32 pc ) void clearProfileData ( ) PRBool isLineExecutable ( PRUint32 line , PRUint32 pcmap ) PRUint32 lineToPc ( PRUint32 line , PRUint32 pcmap ) PRUint32 pcToLine ( PRUint32 pc , PRUint32 pcmap ) void setBreakpoint ( PRUint32 pc )

void clearAllBreakpoints ( )

Clear all breakpoints set in this script.


void clearBreakpoint ( PRUint32 pc )

Clear a breakpoint at a PC in this script.

Arguments:
pc

void clearProfileData ( )

Clear profile data for this script.


PRBool isLineExecutable ( PRUint32 line , PRUint32 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.

Arguments:
line
pcmap

PRUint32 lineToPc ( PRUint32 line , PRUint32 pcmap )

Get the first PC associated with a line. The pcmap argument specifies which pc to source line map to use.

Arguments:
line
pcmap

PRUint32 pcToLine ( PRUint32 pc , PRUint32 pcmap )

Get the closest line number to a given PC. The pcmap argument specifies which pc to source line map to use.

Arguments:
pc
pcmap

void setBreakpoint ( PRUint32 pc )

Set a breakpoint at a PC in this script.

Arguments:
pc

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com