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
Родитель 2cf2fda629
Коммит 5036447688
2 изменённых файлов: 8 добавлений и 10 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);