mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
[INFER] Don't set script->isCachedEval until it is on the compartment's scriptsToGC, bug 642422.
This commit is contained in:
parent
9530ed9e7c
commit
138fd6109b
4
js/src/jit-test/tests/basic/bug642422.js
Normal file
4
js/src/jit-test/tests/basic/bug642422.js
Normal file
@ -0,0 +1,4 @@
|
||||
gczeal(2);
|
||||
var x;
|
||||
var foo = "for (var z = 0; z < 2; ++z) { new Object(new String(this), x)}";
|
||||
eval(foo);
|
@ -1284,7 +1284,6 @@ EvalKernel(JSContext *cx, uintN argc, Value *vp, EvalType evalType, JSStackFrame
|
||||
linearStr, staticLevel);
|
||||
if (!script)
|
||||
return false;
|
||||
script->isCachedEval = true;
|
||||
}
|
||||
|
||||
assertSameCompartment(cx, scopeobj, script);
|
||||
@ -1300,6 +1299,7 @@ EvalKernel(JSContext *cx, uintN argc, Value *vp, EvalType evalType, JSStackFrame
|
||||
MUST_FLOW_LABEL(destroy);
|
||||
js_CallDestroyScriptHook(cx, script);
|
||||
|
||||
script->isCachedEval = true;
|
||||
script->u.nextToGC = *bucket;
|
||||
*bucket = script;
|
||||
#ifdef CHECK_SCRIPT_OWNER
|
||||
|
@ -1125,8 +1125,6 @@ Compiler::compileScript(JSContext *cx, JSObject *scopeChain, JSStackFrame *calle
|
||||
script = JSScript::NewScriptFromCG(cx, &cg);
|
||||
if (script && funbox)
|
||||
script->savedCallerFun = true;
|
||||
if (script && cg.compilingForEval())
|
||||
script->isCachedEval = true;
|
||||
|
||||
#ifdef JS_SCOPE_DEPTH_METER
|
||||
if (script) {
|
||||
|
Loading…
Reference in New Issue
Block a user