Bug 769987 - don't forget to ExpandInlineFrames before discarding jit code (r=bhackett)

This commit is contained in:
Luke Wagner 2012-07-04 10:39:48 -07:00
parent 9f6b998adf
commit be43698db6
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
function h(code) {
f = Function(code);
g()
}
function g() {
f()
}
h()
h()
h("\
arguments[\"0\"];\
gc();\
")

View File

@ -2193,6 +2193,7 @@ JSScript::argumentsOptimizationFailed(JSContext *cx, JSScript *script_)
#ifdef JS_METHODJIT
if (script->hasJITInfo()) {
mjit::ExpandInlineFrames(cx->compartment);
mjit::Recompiler::clearStackReferences(cx->runtime->defaultFreeOp(), script);
mjit::ReleaseScriptCode(cx->runtime->defaultFreeOp(), script);
}