📄 jsdidebuggerservice.idl
字号:
readonly attribute jsdIValue thisValue; /** * Evaluate arbitrary JavaScript in this stack frame. * @param bytes Script to be evaluated. * @param fileName Filename to compile this script under. This is the * filename you'll see in error messages, etc. * @param line Starting line number for this script. One based. * @retval Result of evaluating the script. */ boolean eval (in AString bytes, in string fileName, in unsigned long line, out jsdIValue result); };/** * Script object. In JavaScript engine terms, there's a single script for each * function, and one for the top level script. */[scriptable, uuid(a38f65ca-1dd1-11b2-95d5-ff2947e9c920)]interface jsdIScript : jsdIEphemeral{ /** Internal use only. */ [noscript] readonly attribute JSDContext JSDContext; /** Internal use only. */ [noscript] readonly attribute JSDScript JSDScript; /** * Last version set on this context. * Scripts typically select this with the "language" attribute. * See the VERSION_* consts on jsdIDebuggerService. */ readonly attribute long version; /** * Tag value guaranteed unique among jsdIScript objects. Useful as a * hash key in script. */ readonly attribute unsigned long tag; /** * 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 = 0x01; /** * 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 = 0x02; /** * FLAG_* attributes from above, OR'd together. */ attribute unsigned long flags; /** * 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 string fileName; /** * 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 string functionName; /** * Fetch the function object as a jsdIValue. */ readonly attribute jsdIValue functionObject; /** * Source code for this script, without function declaration. */ readonly attribute AString functionSource; /** * 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; /** * 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; /** * Number of times this script has been called. */ readonly attribute unsigned long callCount; /** * 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; /** * Longest execution time recorded, in milliseconds. */ readonly attribute double maxExecutionTime; /** * Total time spent in this function, in milliseconds. */ readonly attribute double totalExecutionTime; /** * Shortest execution time recorded, in milliseconds, excluding time spent * in other called code. */ readonly attribute double minOwnExecutionTime; /** * Longest execution time recorded, in milliseconds, excluding time spent * in other called code. */ readonly attribute double maxOwnExecutionTime; /** * Total time spent in this function, in milliseconds, excluding time spent * in other called code. */ readonly attribute double totalOwnExecutionTime; /** * Clear profile data for this script. */ void clearProfileData(); const unsigned long PCMAP_SOURCETEXT = 1; /* map to actual source text */ const unsigned long PCMAP_PRETTYPRINT = 2; /* map to pretty printed source */ /** * 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); /** * 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); /** * 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); /** * Set a breakpoint at a PC in this script. */ void setBreakpoint (in unsigned long pc); /** * Clear a breakpoint at a PC in this script. */ void clearBreakpoint (in unsigned long pc); /** * Clear all breakpoints set in this script. */ void clearAllBreakpoints ();};/** * Value objects. Represents typeless JavaScript values (jsval in SpiderMonkey * terminology.) These are valid until the debugger is turned off. Holding a * jsdIValue adds a root for the underlying JavaScript value, so don't keep it * if you don't need to. */[scriptable, uuid(b7964304-1dd1-11b2-ba20-cf4205772e9d)]interface jsdIValue : jsdIEphemeral{ /** Internal use only. */ [noscript] readonly attribute JSDContext JSDContext; /** Internal use only. */ [noscript] readonly attribute JSDValue JSDValue; /** * |false| unless the value is a function declared in script. */ readonly attribute boolean isNative; /** * |true| if the value represents a number, either double or integer. * |false| for all other values, including numbers assigned as strings * (eg. x = "1";) */ readonly attribute boolean isNumber; /** * |true| if the value represents a JavaScript primitive number or string */ readonly attribute boolean isPrimitive; /** Value is either |true| or |false|. */ const unsigned long TYPE_BOOLEAN = 0; /** Value is a primitive number that is too large to fit in an integer. */ const unsigned long TYPE_DOUBLE = 1; /** Value is a primitive number that fits into an integer. */ const unsigned long TYPE_INT = 2; /** Value is a function. */ const unsigned long TYPE_FUNCTION = 3; /** Value is |null|. */ const unsigned long TYPE_NULL = 4; /** Value is an object. */ const unsigned long TYPE_OBJECT = 5; /** Value is a primitive string. */ const unsigned long TYPE_STRING = 6; /** Value is void. */ const unsigned long TYPE_VOID = 7; /** * One of the TYPE_* values above. */ readonly attribute unsigned long jsType; /** * Prototype value if this value represents an object, null if the value is * not an object or the object has no prototype. */ readonly attribute jsdIValue jsPrototype; /** * Parent value if this value represents an object, null if the value is not * an object or the object has no parent. */ readonly attribute jsdIValue jsParent; /** * Class name if this value represents an object. Empty string if the value * is not an object. */ readonly attribute string jsClassName; /** * Constructor name if this value represents an object. Empty string if the * value is not an object. */ readonly attribute jsdIValue jsConstructor; /** * Function name if this value represents a function. Empty string if the * value is not a function. */ readonly attribute string jsFunctionName; /** * Value if interpreted as a boolean. Converts if necessary. */ readonly attribute boolean booleanValue; /** * Value if interpreted as a double. Converts if necessary. */ readonly attribute double doubleValue; /** * Value if interpreted as an integer. Converts if necessary. */ readonly attribute long intValue; /** * Value if interpreted as an object. */ readonly attribute jsdIObject objectValue; /** * Value if interpreted as a string. Converts if necessary. */ readonly attribute string stringValue; /** * Number of properties. 0 if the value is not an object, or the value is * an object but has no properties. */ readonly attribute long propertyCount; /** * Retrieves all properties if this value represents an object. If this * value is not an object a 0 element array is returned. * @param propArray Array of jsdIProperty values for this value. * @param length Size of array. */ void getProperties ([array, size_is(length)] out jsdIProperty propArray, out unsigned long length); /** * Retrieves a single property from the value. Only valid if the value * represents an object. * @param name Name of the property to retrieve. * @retval jsdIProperty for the requested property name or null if no * property exists for the requested name. */ jsdIProperty getProperty (in string name); /** * jsdIValues are wrappers around JavaScript engine structures. Much of the * data is copied instead of shared. The refresh method is used to resync * the jsdIValue with the underlying structure. */ void refresh(); /** * When called from JavaScript, this method returns the JavaScript value * wrapped by this jsdIValue. The calling script is free to use the result * as it would any other JavaScript value. * When called from another language this method returns an xpconnect * defined error code. */ void getWrappedValue();};/** * Properties specific to values which are also objects. * XXX We don't add roots for these yet, so make sure you hold on to the * jsdIValue from whence your jsdIObject instance came for at least as long as * you hold the jsdIObject. * XXX Maybe the jsClassName, jsConstructorName, and property related attribute/ * functions from jsdIValue should move to this interface. We could inherit from * jsdIValue or use interface flattening or something. */[scriptable, uuid(d500e8b8-1dd1-11b2-89a1-cdf55d91cbbd)]interface jsdIObject : nsISupports{ /** Internal use only. */ [noscript] readonly attribute JSDContext JSDContext; /** Internal use only. */ [noscript] readonly attribute JSDObject JSDObject; /** * The URL (filename) that contains the script which caused this object * to be created. */ readonly attribute string creatorURL; /** * Line number in the creatorURL where this object was created. */ readonly attribute unsigned long creatorLine; /** * The URL (filename) that contains the script which defined the constructor * used to create this object. */ readonly attribute string constructorURL; /** * Line number in the creatorURL where this object was created. */ readonly attribute unsigned long constructorLine; /** * jsdIValue for this object. */ readonly attribute jsdIValue value;};/** * Representation of a property of an object. When an instance is invalid, all * method and property access will result in a NS_UNAVAILABLE error. */[scriptable, uuid(b8816e56-1dd1-11b2-81dc-8ba99a833d9e)]interface jsdIProperty : jsdIEphemeral{ /** Internal use only. */ [noscript] readonly attribute JSDContext JSDContext; /** Internal use only. */ [noscript] readonly attribute JSDProperty JSDProperty; /** * FLAG_* values must be kept in sync with JSDPD_* #defines in jsdebug.h. */ /** visible to for/in loop */ const unsigned long FLAG_ENUMERATE = 0x01; /** assignment is error */ const unsigned long FLAG_READONLY = 0x02; /** property cannot be deleted */ const unsigned long FLAG_PERMANENT = 0x04; /** property has an alias id */ const unsigned long FLAG_ALIAS = 0x08; /** argument to function */ const unsigned long FLAG_ARGUMENT = 0x10; /** local variable in function */ const unsigned long FLAG_VARIABLE = 0x20; /** exception occurred looking up property, value is exception */ const unsigned long FLAG_EXCEPTION = 0x40; /** native getter returned JS_FALSE without throwing an exception */ const unsigned long FLAG_ERROR = 0x80; /** found via explicit lookup (property defined elsewhere.) */ const unsigned long FLAG_HINTED = 0x800; /** FLAG_* values OR'd together, representing the flags for this property. */ readonly attribute unsigned long flags; /** jsdIValue representing the alias for this property. */ readonly attribute jsdIValue alias; /** name for this property. */ readonly attribute jsdIValue name; /** value of this property. */ readonly attribute jsdIValue value; /** slot number if this property is a local variable or parameter. */ readonly attribute unsigned long varArgSlot;};/*[scriptable, uuid(a47adad2-1dd1-11b2-b9e9-8e67a47beca5)]interface jsdISourceText : nsISupports{};[scriptable, uuid(b6d1c006-1dd1-11b2-b9d8-b4d1ccfb74d8)]interface jsdIThreadState : nsISupports{ [noscript] readonly attribute JSDContext JSDContext; [noscript] readonly attribute JSDThreadState JSDThreadState; readonly attribute unsigned long frameCount; readonly attribute jsdIStackFrame topFrame; attribute jsdIValue pendingException;};*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -