[scriptable, uuid(9a7b6ad0-1dd1-11b2-a789-fcfae96356a2)]
interface jsdIExecutionHook : nsISupports
Constants
Hook instances of this interface up to the jsdIDebuggerService::breakpointHook, debuggerHook, errorHook, interruptHook, and throwHook properties. TYPE_* values must be kept in sync with JSD_HOOK_* #defines in jsdebug.h. Execution stopped because we're in single step mode.
const
unsigned long
TYPE_INTERRUPTED = 0
Execution stopped by a trap instruction (i.e. breakoint.)
const
unsigned long
TYPE_BREAKPOINT = 1
Error handler returned an "invoke debugger" value.
const
unsigned long
TYPE_DEBUG_REQUESTED = 2
Debugger keyword encountered.
const
unsigned long
TYPE_DEBUGGER_KEYWORD = 3
Exception was thrown.
const
unsigned long
TYPE_THROW = 4
RETURN_* values must be kept in sync with JSD_HOOK_RETURN_* #defines in jsdebug.h. Indicates unrecoverable error processing the hook. This will cause the script being executed to be aborted without raising a JavaScript exception.
const
unsigned long
RETURN_HOOK_ERROR = 0
Continue processing normally. This is the "do nothing special" return value for all hook types *except* TYPE_THROW. Returning RETURN_CONTINUE from TYPE_THROW cause the exception to be ignored. Return RETURN_CONTINUE_THROW to continue exception processing from TYPE_THROW hooks.
const
unsigned long
RETURN_CONTINUE = 1
Same effect as RETURN_HOOK_ERROR.
const
unsigned long
RETURN_ABORT = 2
Return the value of the |val| parameter.
const
unsigned long
RETURN_RET_WITH_VAL = 3
Throw the value of the |val| parameter.
const
unsigned long
RETURN_THROW_WITH_VAL = 4
Continue the current throw.
const
unsigned long
RETURN_CONTINUE_THROW = 5
Methods
@param frame A jsdIStackFrame object representing the bottom stack frame.
@param type One of the jsdIExecutionHook::TYPE_ constants.
@param val in - Current exception (if any) when this method is called.
out - If you return RETURN_THROW_WITH_VAL, value to be
thrown.
If you return RETURN_RET_WITH_VAL, value to return.
All other return values, not significant.
@retval One of the jsdIExecutionHook::RETURN_* constants.
unsigned long
onExecute(in jsdIStackFrame frame, in unsigned long type, inout jsdIValue val)
Compare to: