Bug 1278839 - Fix a trivial OOM in SetJitCompilerOption. r=nbp

This commit is contained in:
Jan de Mooij 2016-06-16 12:09:24 +01:00
parent 7d17083dd6
commit eab2a7d8f2
2 changed files with 4 additions and 0 deletions

View File

@ -1944,6 +1944,8 @@ SetJitCompilerOption(JSContext* cx, unsigned argc, Value* vp)
}
JSFlatString* strArg = JS_FlattenString(cx, args[0].toString());
if (!strArg)
return false;
#define JIT_COMPILER_MATCH(key, string) \
else if (JS_FlatStringEqualsAscii(strArg, string)) \

View File

@ -0,0 +1,2 @@
for (var i=0; i<2; i++)
oomTest(() => eval("setJitCompilerOption(eval + Function, 0);"));