Bug 820084 - Fix handling of thisv value when top-level script is entered into via enterJIT. r=sstangl

This commit is contained in:
Kannan Vijayan 2012-12-14 16:24:28 -05:00
parent f04c3eb02c
commit d3beb89155

View File

@ -1512,6 +1512,7 @@ EnterIon(JSContext *cx, StackFrame *fp, void *jitcode)
int maxArgc = 0;
Value *maxArgv = NULL;
int numActualArgs = 0;
RootedValue thisv(cx);
void *calleeToken;
if (fp->isFunctionFrame()) {
@ -1540,6 +1541,9 @@ EnterIon(JSContext *cx, StackFrame *fp, void *jitcode)
calleeToken = CalleeToToken(&fp->callee());
} else {
calleeToken = CalleeToToken(fp->script());
thisv = fp->thisValue();
maxArgc = 1;
maxArgv = thisv.address();
}
// Caller must construct |this| before invoking the Ion function.