Skip to content
Browse files

Correct function pointer discombobulation; ejsLog was causing emulato…

…r crashes.
  • Loading branch information...
1 parent e2fc8ab commit 7c9b5819a4d43d4e8542e725c762639ff805ce96 @dizzyd dizzyd committed Sep 20, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 c_src/spidermonkey.c
View
4 c_src/spidermonkey.c
@@ -160,8 +160,8 @@ spidermonkey_vm *sm_initialize(long thread_stack, long heap_size) {
JS_SetErrorReporter(vm->context, on_error);
JS_SetBranchCallback(vm->context, on_branch);
JS_SetContextPrivate(vm->context, state);
- JSNative *funptr = (JSNative *) *js_log;
- JS_DefineFunction(vm->context, JS_GetGlobalObject(vm->context), "ejsLog", *funptr,
+ JSNative funptr = (JSNative) &js_log;
+ JS_DefineFunction(vm->context, JS_GetGlobalObject(vm->context), "ejsLog", funptr,
0, JSFUN_FAST_NATIVE);
end_request(vm);

0 comments on commit 7c9b581

Please sign in to comment.
Something went wrong with that request. Please try again.