Skip to content
Snippets Groups Projects
Commit 25625186 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Previous commit fixed issue with JS_GC before JS_ENDREQUEST

So revert the order back to the way it was in aa2bcd61
(don't you love these git references?).

Also, the previous fix for js_execfile() calls for global hot-key events also
fixed the EX_JS_CX feature I was working on (js_execmodule)!
parent 20393557
No related branches found
No related tags found
No related merge requests found
......@@ -725,9 +725,10 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco
JS_RemoveValueRoot(js_cx, &old_js_argc);
}
JS_ENDREQUEST(js_cx);
JS_GC(js_cx);
JS_ENDREQUEST(js_cx);
return(result);
}
......@@ -742,7 +743,7 @@ long sbbs_t::js_execmodule(const char *cmd, long mode, const char* startup_dir)
JSObject* js_glob;
JSContext* js_cx = js_init(&js_runtime, &js_glob, "XtrnModule");
js_create_user_objects(js_cx, js_glob);
long result = js_execfile(cmd, startup_dir, js_glob, js_cx);
long result = js_execfile(cmd, startup_dir, js_glob, js_cx, js_glob);
JS_BEGINREQUEST(js_cx);
JS_RemoveObjectRoot(js_cx, &js_glob);
JS_ENDREQUEST(js_cx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment