Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

Commit

Permalink
setting debugging hooks in one step
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 22, 2008
1 parent 3924b2e commit 6100597
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions ext/spidermonkey/context.c
Expand Up @@ -137,17 +137,9 @@ set_debugger(VALUE self, VALUE debugger)
Data_Get_Struct(self, OurContext, context);
Data_Get_Struct(debugger, JSDebugHooks, debug_hooks);

JS_SetInterrupt(context->runtime, debug_hooks->interruptHandler, debugger);
JS_SetNewScriptHook(context->runtime, debug_hooks->newScriptHook, debugger);
JS_SetDestroyScriptHook(context->runtime, debug_hooks->destroyScriptHook, debugger);
JS_SetDebuggerHandler(context->runtime, debug_hooks->debuggerHandler, debugger);
JS_SetSourceHandler(context->runtime, debug_hooks->sourceHandler, debugger);
JS_SetExecuteHook(context->runtime, debug_hooks->executeHook, debugger);
JS_SetCallHook(context->runtime, debug_hooks->callHook, debugger);
JS_SetThrowHook(context->runtime, debug_hooks->throwHook, debugger);
JS_SetDebugErrorHook(context->runtime, debug_hooks->debugErrorHook, debugger);

return Qtrue;
JS_SetContextDebugHooks(context->js, debug_hooks);

return debugger;
}

/*
Expand Down

0 comments on commit 6100597

Please sign in to comment.