Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
jsdIScript Interface Reference

Script object. More...

import "jsdIDebuggerService.idl";

Inheritance diagram for jsdIScript:
Inheritance graph
[legend]
Collaboration diagram for jsdIScript:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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.
void invalidate ()
 Mark this instance as invalid.

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 string fileName
 Filename given for this script when it was compiled.
readonly attribute string 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
readonly attribute boolean isValid
 |true| if this object is still valid.

Detailed Description

Script object.

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

Definition at line 858 of file jsdIDebuggerService.idl.


Member Function Documentation

Clear all breakpoints set in this script.

Clear a breakpoint at a PC in this script.

Clear profile data for this script.

Mark this instance as invalid.

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.

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.

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.

Set a breakpoint at a PC in this script.


Member Data Documentation

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.

Definition at line 928 of file jsdIDebuggerService.idl.

Number of times this script has been called.

Definition at line 940 of file jsdIDebuggerService.idl.

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.

Definition at line 905 of file jsdIDebuggerService.idl.

Determines whether or not to ignore breakpoints, etc.

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

Definition at line 892 of file jsdIDebuggerService.idl.

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.

Definition at line 887 of file jsdIDebuggerService.idl.

FLAG_* attributes from above, OR'd together.

Definition at line 897 of file jsdIDebuggerService.idl.

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.

Definition at line 913 of file jsdIDebuggerService.idl.

Fetch the function object as a jsdIValue.

Definition at line 917 of file jsdIDebuggerService.idl.

Source code for this script, without function declaration.

Definition at line 921 of file jsdIDebuggerService.idl.

|true| if this object is still valid.

If not, many or all of the methods and/or properties of the inheritor may no longer be callable.

Definition at line 691 of file jsdIDebuggerService.idl.

Internal use only.

Definition at line 861 of file jsdIDebuggerService.idl.

Internal use only.

Definition at line 863 of file jsdIDebuggerService.idl.

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.

Definition at line 935 of file jsdIDebuggerService.idl.

Longest execution time recorded, in milliseconds.

Definition at line 952 of file jsdIDebuggerService.idl.

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

Definition at line 966 of file jsdIDebuggerService.idl.

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

Definition at line 944 of file jsdIDebuggerService.idl.

Shortest execution time recorded, in milliseconds.

Definition at line 948 of file jsdIDebuggerService.idl.

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

Definition at line 961 of file jsdIDebuggerService.idl.

Definition at line 979 of file jsdIDebuggerService.idl.

Definition at line 978 of file jsdIDebuggerService.idl.

readonly attribute unsigned long jsdIScript::tag

Tag value guaranteed unique among jsdIScript objects.

Useful as a hash key in script.

Definition at line 876 of file jsdIDebuggerService.idl.

Total time spent in this function, in milliseconds.

Definition at line 956 of file jsdIDebuggerService.idl.

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

Definition at line 971 of file jsdIDebuggerService.idl.

Last version set on this context.

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

Definition at line 870 of file jsdIDebuggerService.idl.


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