void * jsd_TopLevelCallHook(JSContext *cx, JSAbstractFramePtr frame, bool isConstructing, JSBool before, JSBool *ok, void *closure) { JSDContext* jsdc; JSD_CallHookProc hook; void* hookData; jsdc = (JSDContext*) closure; /* local in case jsdc->toplevelHook gets cleared on another thread */ JSD_LOCK(); hook = jsdc->toplevelHook; hookData = jsdc->toplevelHookData; JSD_UNLOCK(); if (_callHook (jsdc, cx, frame, isConstructing, before, (before) ? JSD_HOOK_TOPLEVEL_START : JSD_HOOK_TOPLEVEL_END, hook, hookData)) { return closure; } return NULL; }
void * JS_DLL_CALLBACK jsd_TopLevelCallHook(JSContext *cx, JSStackFrame *fp, JSBool before, JSBool *ok, void *closure) { JSDContext* jsdc; JSD_CallHookProc hook; void* hookData; jsdc = (JSDContext*) closure; /* local in case jsdc->toplevelHook gets cleared on another thread */ JSD_LOCK(); hook = jsdc->toplevelHook; hookData = jsdc->toplevelHookData; JSD_UNLOCK(); if (_callHook (jsdc, cx, fp, before, (before) ? JSD_HOOK_TOPLEVEL_START : JSD_HOOK_TOPLEVEL_END, hook, hookData)) { return closure; } return NULL; }
void * jsd_FunctionCallHook(JSContext *cx, JSAbstractFramePtr frame, bool isConstructing, JSBool before, JSBool *ok, void *closure) { JSDContext* jsdc; JSD_CallHookProc hook; void* hookData; jsdc = (JSDContext*) closure; /* local in case jsdc->functionHook gets cleared on another thread */ JSD_LOCK(); hook = jsdc->functionHook; hookData = jsdc->functionHookData; JSD_UNLOCK(); if (_callHook (jsdc, cx, frame, isConstructing, before, (before) ? JSD_HOOK_FUNCTION_CALL : JSD_HOOK_FUNCTION_RETURN, hook, hookData)) { return closure; } return NULL; }
void * JS_DLL_CALLBACK jsd_FunctionCallHook(JSContext *cx, JSStackFrame *fp, JSBool before, JSBool *ok, void *closure) { JSDContext* jsdc; JSD_CallHookProc hook; void* hookData; jsdc = (JSDContext*) closure; /* local in case jsdc->functionHook gets cleared on another thread */ JSD_LOCK(); hook = jsdc->functionHook; hookData = jsdc->functionHookData; JSD_UNLOCK(); if (_callHook (jsdc, cx, fp, before, (before) ? JSD_HOOK_FUNCTION_CALL : JSD_HOOK_FUNCTION_RETURN, hook, hookData)) { return closure; } return NULL; }