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:
igor%mir2.org
2002-12-23 15:01:53 +00:00
parent 8da562678c
commit ff75833db8

View File

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