Created
May 19, 2011 16:07
-
-
Save Vagabond/981134 to your computer and use it in GitHub Desktop.
erlang_js 1.8.5 patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- deps/erlang_js/c_src/spidermonkey.c.orig Wed Jan 5 02:14:56 2011 | |
+++ deps/erlang_js/c_src/spidermonkey.c Wed Apr 13 15:03:49 2011 | |
@@ -49,6 +49,7 @@ | |
} | |
inline void end_request(spidermonkey_vm *vm) { | |
+ JS_TriggerOperationCallback(vm->context); | |
JS_EndRequest(vm->context); | |
JS_ClearContextThread(vm->context); | |
} | |
@@ -75,7 +76,7 @@ | |
} | |
} | |
-JSBool on_branch(JSContext *context, JSScript *script) { | |
+JSBool on_branch(JSContext *context) { | |
spidermonkey_state *state = (spidermonkey_state *) JS_GetContextPrivate(context); | |
state->branch_count++; | |
if (state->branch_count == 550) { | |
@@ -148,9 +149,9 @@ | |
vm->global = JS_NewObject(vm->context, &global_class, NULL, NULL); | |
JS_InitStandardClasses(vm->context, vm->global); | |
JS_SetErrorReporter(vm->context, on_error); | |
- JS_SetBranchCallback(vm->context, on_branch); | |
+ JS_SetOperationCallback(vm->context, on_branch); | |
JS_SetContextPrivate(vm->context, state); | |
- JSNative *funptr = (JSNative *) *js_log; | |
+ JSNative funptr = (JSNative) js_log; | |
JS_DefineFunction(vm->context, JS_GetGlobalObject(vm->context), "ejsLog", funptr, | |
0, JSFUN_FAST_NATIVE); | |
end_request(vm); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment