Testcase ecma_2/Exceptions/expression-020.js failed
Failure messages were:
result = this.eval("NaN") (threw No exception thrown) = NaN FAILED! expected: Passed
This commit is contained in:
norris%netscape.com 1999-11-22 19:35:59 +00:00
Родитель c6f15cb391
Коммит ce59129ab9
2 изменённых файлов: 22 добавлений и 18 удалений

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

@ -626,15 +626,17 @@ public class NodeTransformer {
*/
private boolean isSpecialCallName(Node tree, Node node) {
Node left = node.getFirstChild();
String name = "";
if (left.getType() == TokenStream.NAME)
name = left.getString();
else
if (left.getType() == TokenStream.GETPROP)
name = left.getLastChild().getString();
if (name.equals("eval") || name.equals("Closure") ||
name.equals("With") || name.equals("exec"))
{
boolean isSpecial = false;
if (left.getType() == TokenStream.NAME) {
String name = left.getString();
isSpecial = name.equals("eval") || name.equals("With");
} else {
if (left.getType() == TokenStream.GETPROP) {
String name = left.getLastChild().getString();
isSpecial = name.equals("exec");
}
}
if (isSpecial) {
// Calls to these functions require activation objects.
if (inFunction)
((FunctionNode) tree).setRequiresActivation(true);

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

@ -626,15 +626,17 @@ public class NodeTransformer {
*/
private boolean isSpecialCallName(Node tree, Node node) {
Node left = node.getFirstChild();
String name = "";
if (left.getType() == TokenStream.NAME)
name = left.getString();
else
if (left.getType() == TokenStream.GETPROP)
name = left.getLastChild().getString();
if (name.equals("eval") || name.equals("Closure") ||
name.equals("With") || name.equals("exec"))
{
boolean isSpecial = false;
if (left.getType() == TokenStream.NAME) {
String name = left.getString();
isSpecial = name.equals("eval") || name.equals("With");
} else {
if (left.getType() == TokenStream.GETPROP) {
String name = left.getLastChild().getString();
isSpecial = name.equals("exec");
}
}
if (isSpecial) {
// Calls to these functions require activation objects.
if (inFunction)
((FunctionNode) tree).setRequiresActivation(true);