mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Bug 1278839 - Fix a trivial OOM in SetJitCompilerOption. r=nbp
This commit is contained in:
parent
7d17083dd6
commit
eab2a7d8f2
@ -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)) \
|
||||
|
2
js/src/jit-test/tests/basic/bug1278839.js
Normal file
2
js/src/jit-test/tests/basic/bug1278839.js
Normal file
@ -0,0 +1,2 @@
|
||||
for (var i=0; i<2; i++)
|
||||
oomTest(() => eval("setJitCompilerOption(eval + Function, 0);"));
|
Loading…
Reference in New Issue
Block a user