Bug 1107936 - Do not define os for fuzzing-safe shell

--HG--
extra : rebase_source : 8ec7747fee2f1117f649edd4d0470ff63cb6e102
This commit is contained in:
Steve Fink 2014-12-05 18:01:22 -08:00
parent aa410c5b43
commit 1c1548ddbf

View File

@ -5328,8 +5328,12 @@ NewGlobalObject(JSContext *cx, JS::CompartmentOptions &options,
if (!js::DefineTestingFunctions(cx, glob, fuzzingSafe))
return nullptr;
if (!fuzzingSafe && !JS_DefineFunctionsWithHelp(cx, glob, fuzzing_unsafe_functions))
return nullptr;
if (!fuzzingSafe) {
if (!JS_DefineFunctionsWithHelp(cx, glob, fuzzing_unsafe_functions))
return nullptr;
if (!js::DefineOS(cx, glob))
return nullptr;
}
/* Initialize FakeDOMObject. */
static const js::DOMCallbacks DOMcallbacks = {
@ -5666,9 +5670,6 @@ Shell(JSContext *cx, OptionParser *op, char **envp)
JSAutoCompartment ac(cx, glob);
if (!js::DefineOS(cx, glob))
return 1;
int result = ProcessArgs(cx, glob, op);
if (enableDisassemblyDumps)