Changing ScriptRuntime.initScript to return vois since it does not and should not change scope

This commit is contained in:
igor%mir2.org 2003-10-01 11:55:56 +00:00
parent c3fc6c32a5
commit 002127495a
2 changed files with 6 additions and 8 deletions

View File

@ -1876,10 +1876,10 @@ public class ScriptRuntime {
}
}
public static Scriptable initScript(Context cx, Scriptable scope,
NativeFunction funObj,
Scriptable thisObj,
boolean fromEvalCode)
public static void initScript(Context cx, final Scriptable scope,
NativeFunction funObj,
Scriptable thisObj,
boolean fromEvalCode)
{
String[] argNames = funObj.argNames;
if (argNames != null) {
@ -1908,8 +1908,6 @@ public class ScriptRuntime {
}
}
}
return scope;
}
public static Scriptable runScript(Script script) {

View File

@ -1312,6 +1312,7 @@ class BodyCodegen
+"Lorg/mozilla/javascript/Scriptable;"
+"[Ljava/lang/Object;"
+")Lorg/mozilla/javascript/Scriptable;");
cfw.addAStore(variableObjectLocal);
debugVariableName = "activation";
} else {
cfw.addALoad(contextLocal);
@ -1325,10 +1326,9 @@ class BodyCodegen
+"Lorg/mozilla/javascript/NativeFunction;"
+"Lorg/mozilla/javascript/Scriptable;"
+"Z"
+")Lorg/mozilla/javascript/Scriptable;");
+")V");
debugVariableName = "global";
}
cfw.addAStore(variableObjectLocal);
int functionCount = scriptOrFn.getFunctionCount();
for (int i = 0; i != functionCount; i++) {