Skip to content
Snippets Groups Projects
Commit 0988a9b0 authored by deuce's avatar deuce
Browse files

Use a Compartment - makes the crashing stop!

parent d5ccd1e1
No related branches found
No related tags found
No related merge requests found
......@@ -3688,7 +3688,7 @@ JSObject* DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethod
p->methods = methods;
p->startup = startup;
if((glob = JS_NewGlobalObject(cx, &js_global_class)) ==NULL)
if((glob = JS_NewCompartmentAndGlobalObject(cx, &js_global_class, NULL)) ==NULL)
return(NULL);
if(!JS_SetPrivate(cx, glob, p)) /* Store a pointer to scfg_t and the new methods */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment