Back to index

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

Hook instances of this interface up to the jsdIDebuggerService::breakpointHook, debuggerHook, errorHook, interruptHook, and throwHook properties. More...

import "jsdIDebuggerService.idl";

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

List of all members.

Public Member Functions

unsigned long onExecute (in jsdIStackFrame frame, in unsigned long type, inout jsdIValue val)

Public Attributes

const unsigned long TYPE_INTERRUPTED = 0
 TYPE_* values must be kept in sync with JSD_HOOK_* #defines in jsdebug.h.
const unsigned long TYPE_BREAKPOINT = 1
 Execution stopped by a trap instruction (i.e.
const unsigned long TYPE_DEBUG_REQUESTED = 2
 Error handler returned an "invoke debugger" value.
const unsigned long TYPE_DEBUGGER_KEYWORD = 3
 Debugger keyword encountered.
const unsigned long TYPE_THROW = 4
 Exception was thrown.
const unsigned long RETURN_HOOK_ERROR = 0
 RETURN_* values must be kept in sync with JSD_HOOK_RETURN_* #defines in jsdebug.h.
const unsigned long RETURN_CONTINUE = 1
 Continue processing normally.
const unsigned long RETURN_ABORT = 2
 Same effect as RETURN_HOOK_ERROR.
const unsigned long RETURN_RET_WITH_VAL = 3
 Return the value of the |val| parameter.
const unsigned long RETURN_THROW_WITH_VAL = 4
 Throw the value of the |val| parameter.
const unsigned long RETURN_CONTINUE_THROW = 5
 Continue the current throw.

Detailed Description

Hook instances of this interface up to the jsdIDebuggerService::breakpointHook, debuggerHook, errorHook, interruptHook, and throwHook properties.

Definition at line 602 of file jsdIDebuggerService.idl.


Member Function Documentation

unsigned long jsdIExecutionHook::onExecute ( in jsdIStackFrame  frame,
in unsigned long  type,
inout jsdIValue  val 
)
Parameters:
frameA jsdIStackFrame object representing the bottom stack frame.
typeOne of the jsdIExecutionHook::TYPE_ constants.
valin - 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.
Return values:
Oneof the jsdIExecutionHook::RETURN_* constants.

Member Data Documentation

Same effect as RETURN_HOOK_ERROR.

Definition at line 651 of file jsdIDebuggerService.idl.

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.

Definition at line 647 of file jsdIDebuggerService.idl.

Continue the current throw.

Definition at line 663 of file jsdIDebuggerService.idl.

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.

Definition at line 639 of file jsdIDebuggerService.idl.

Return the value of the |val| parameter.

Definition at line 655 of file jsdIDebuggerService.idl.

Throw the value of the |val| parameter.

Definition at line 659 of file jsdIDebuggerService.idl.

Execution stopped by a trap instruction (i.e.

breakoint.)

Definition at line 615 of file jsdIDebuggerService.idl.

Error handler returned an "invoke debugger" value.

Definition at line 619 of file jsdIDebuggerService.idl.

Debugger keyword encountered.

Definition at line 623 of file jsdIDebuggerService.idl.

TYPE_* values must be kept in sync with JSD_HOOK_* #defines in jsdebug.h.

Execution stopped because we're in single step mode.

Definition at line 611 of file jsdIDebuggerService.idl.

Exception was thrown.

Definition at line 627 of file jsdIDebuggerService.idl.


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