jsdIStackFrame 编辑
js/jsd/idl/jsdIDebuggerService.idl
Scriptable Please add a summary to this article. Inherits from: jsdIEphemeral
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)Strict mode is on. Warnings reported as errors. Makes eval()
use the last object on its 'obj' param's scope
chain as the ECMA 'variables object'. Private data for this object is an nsISupports
object. Attempting to alter this bit will result in an NS_ERROR_ILLEGAL_VALUE. OPT_* values above, OR'd together. Last version set on this context. Scripts typically select this with the "language" attribute. See the VERSION_* consts on jsdIDebuggerService. Unique tag among all valid jsdIContext objects, useful as a hash key. Private data for this context, if it is an nsISupports
, |null
| otherwise. Retrieve the underlying context wrapped by this jsdIContext. Top of the scope
chain for this context. |true
| if this context should be allowed to run scripts, |false
| otherwise. This attribute is only valid for contexts which implement nsIScriptContext
. Setting or getting this attribute on any other context will throw a NS_ERROR_NO_INTERFACE exception. Stack frame objects. These are only valid inside the jsdIExecutionHook which gave it to you. After you return from that handler the bottom frame, and any frame you found attached through it, are invalidated via the jsdIEphemeral interface. Once a jsdIStackFrame
has been invalidated all method and property accesses will throw a NS_ERROR_NOT_AVAILABLE exception.
Method overview
boolean eval(in AString bytes, in AUTF8String fileName, in unsigned long line, out jsdIValue result); |
Attributes
Attribute | Type | Description |
callee |
| Function object running in this stack frame. Read only. |
callingFrame |
| Link to the caller's stack frame. Read only. |
executionContext |
| Executon context. Read only. |
functionName | AUTF8String | Function name executing in this stack frame. Read only. |
isConstructing | boolean | True if stack frame is constructing a new object. Read only. |
isDebugger | boolean | True if stack frame represents a frame created as a result of a debugger evaluation. Read only. |
isNative | boolean | True if stack frame represents a native frame. Read only. Obsolete since Gecko 2.0 |
JSDContext | JSDContext | Internal use only. Read only. Native code only! |
JSDStackFrameInfo | JSDStackFrameInfo | Internal use only. Read only. Native code only! |
JSDThreadState | JSDThreadState | Internal use only. Read only. Native code only! |
line | unsigned long | Current line number (using the script 's pc to line map.) Read only. |
pc | unsigned long | Current program counter in this stack frame. Read only. |
scope |
| Top object in the scope chain. Read only. |
script |
| Script running in this stack frame, null for native frames. Read only. |
thisValue |
| |this| object for this stack frame. Read only. |
Methods
eval()
Evaluate arbitrary JavaScript in this stack frame.
boolean eval( in AString bytes, in AUTF8String fileName, in unsigned long line, out jsdIValue result );
Parameters
bytes
Script
to be evaluated.fileName
- Filename to compile this
script
under. This is the filename you'll see in error messages, and so on. line
result
Return value
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论