Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit a563651f authored by deuce's avatar deuce

We do *not* want JSOPTION_VAROBJFIX set since it causes variables to be

created in the global scope when when a scope is passed to load(), require()
or js.exec().

While having 'var x = 0;' and 'x = 0;' put x in different scopes is bad, we
actually want them all in the passed scope, not the global scope... and that's
not an option.

It looks like js.exec() will actually need to set scope as the global object
and add a second global object to the original scope.
parent f8381a4f
......@@ -824,7 +824,7 @@ static BOOL js_init(char** env)
if((js_cx = JS_NewContext(js_runtime, js_cx_stack))==NULL)
return(FALSE);
#ifdef JSDOOR
JS_SetOptions(js_cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT | JSOPTION_COMPILE_N_GO | JSOPTION_PROFILING);
JS_SetOptions(js_cx, JSOPTION_JIT | JSOPTION_METHODJIT | JSOPTION_COMPILE_N_GO | JSOPTION_PROFILING);
#endif
JS_BEGINREQUEST(js_cx);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment