Incorrect upvar access on trace involving top-level scripts (507292, r=dmandelin).

This commit is contained in:
Andreas Gal 2009-07-30 19:18:18 -07:00
parent 2e92fcbbe3
commit d2646f3c10

View File

@ -10373,7 +10373,7 @@ TraceRecorder::interpretedFunctionCall(jsval& fval, JSFunction* fun, uintN argc,
if (callDepth >= treeInfo->maxCallDepth)
treeInfo->maxCallDepth = callDepth + 1;
if (callDepth == 0)
fi->spoffset = 2 /*callee,this*/ + argc - fi->spdist;
fi->spoffset = -fp->script->nfixed;
lir->insStorei(INS_CONSTPTR(fi), lirbuf->rp, callDepth * sizeof(FrameInfo*));