Always put function expression statements into initial activation object ignoring the with statement to follow SpiderMonkey git-svn-id: svn://10.0.0.236/trunk@135592 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1951,6 +1951,12 @@ public class ScriptRuntime {
|
||||
} else if (type == FunctionNode.FUNCTION_EXPRESSION_STATEMENT) {
|
||||
String name = function.functionName;
|
||||
if (name != null && name.length() != 0) {
|
||||
// Always put function expression statements into initial
|
||||
// activation object ignoring the with statement to follow
|
||||
// SpiderMonkey
|
||||
while (scope instanceof NativeWith) {
|
||||
scope = scope.getParentScope();
|
||||
}
|
||||
scope.put(name, scope, function);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user