[scriptable, uuid(b1b7f95d-85f9-431e-afb0-936f91c27244)]
interface jsdIScript : jsdIEphemeral

Constants

 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.
const unsigned long FLAG_PROFILE = 1
 Determines whether or not to ignore breakpoints, etc. in this script.
 The context flag JSD_DEBUG_WHEN_SET decides the logic.
const unsigned long FLAG_DEBUG = 2

          
const unsigned long PCMAP_SOURCETEXT = 1

          
const unsigned long PCMAP_PRETTYPRINT = 2

Attributes

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

 Internal use only. */
[noscript] readonly attribute JSDContext JSDContext
 Internal use only. */
[noscript] readonly attribute JSDScript JSDScript
 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 baseLineNumber
 Number of times this script has been called.
readonly attribute unsigned long callCount
 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.
readonly attribute AUTF8String fileName
 FLAG_* attributes from above, OR'd together.
attribute unsigned long flags
 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 attribute AUTF8String functionName
 Fetch the function object as a jsdIValue.
readonly attribute jsdIValue functionObject
 Source code for this script, without function declaration.
readonly attribute AString functionSource
 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 unsigned long lineExtent
 Longest execution time recorded, in milliseconds.
readonly attribute double maxExecutionTime
 Longest execution time recorded, in milliseconds, excluding time spent
 in other called code.
readonly attribute double maxOwnExecutionTime
 Number of times this script called itself, directly or indirectly.
readonly attribute unsigned long maxRecurseDepth
 Shortest execution time recorded, in milliseconds.
readonly attribute double minExecutionTime
 Shortest execution time recorded, in milliseconds, excluding time spent
 in other called code.
readonly attribute double minOwnExecutionTime
 Tag value guaranteed unique among jsdIScript objects.  Useful as a
 hash key in script.
readonly attribute unsigned long tag
 Total time spent in this function, in milliseconds.
readonly attribute double totalExecutionTime
 Total time spent in this function, in milliseconds, excluding time spent
 in other called code.
readonly attribute double totalOwnExecutionTime
 Last version set on this context.
 Scripts typically select this with the "language" attribute.
 See the VERSION_* consts on jsdIDebuggerService.
readonly attribute long version

Methods

 Clear all breakpoints set in this script.
void clearAllBreakpoints()
 Clear a breakpoint at a PC in this script.
void clearBreakpoint(in unsigned long pc)
 Clear profile data for this script.
void clearProfileData()
 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.
boolean isLineExecutable(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.
unsigned long lineToPc(in unsigned long line, 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.
unsigned long pcToLine(in unsigned long pc, in unsigned long pcmap)
 Set a breakpoint at a PC in this script.
void setBreakpoint(in unsigned long pc)