fixes case where an InterpretedFunction has both a closure and needs an activation.

This commit is contained in:
beard%netscape.com 1999-12-09 22:05:09 +00:00
parent 0a5450b336
commit f32c492fc7
2 changed files with 8 additions and 10 deletions

View File

@ -71,13 +71,12 @@ class InterpretedFunction extends NativeFunction {
Object[] args)
throws JavaScriptException
{
itsData.itsCX = cx;
if (itsClosure != null)
scope = itsClosure;
if (itsData.itsNeedsActivation)
scope = ScriptRuntime.initVarObj(cx, scope, this, thisObj, args);
itsData.itsCX = cx;
if (itsClosure == null)
itsData.itsScope = scope;
else
itsData.itsScope = itsClosure;
itsData.itsScope = scope;
itsData.itsThisObj = thisObj;
itsData.itsInArgs = args;
return Interpreter.interpret(itsData);

View File

@ -71,13 +71,12 @@ class InterpretedFunction extends NativeFunction {
Object[] args)
throws JavaScriptException
{
itsData.itsCX = cx;
if (itsClosure != null)
scope = itsClosure;
if (itsData.itsNeedsActivation)
scope = ScriptRuntime.initVarObj(cx, scope, this, thisObj, args);
itsData.itsCX = cx;
if (itsClosure == null)
itsData.itsScope = scope;
else
itsData.itsScope = itsClosure;
itsData.itsScope = scope;
itsData.itsThisObj = thisObj;
itsData.itsInArgs = args;
return Interpreter.interpret(itsData);