mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Changing ScriptRuntime.initScript to return vois since it does not and should not change scope
This commit is contained in:
parent
c3fc6c32a5
commit
002127495a
@ -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) {
|
||||
|
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user