summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/SyntaxParseHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/frontend/SyntaxParseHandler.h')
-rw-r--r--js/src/frontend/SyntaxParseHandler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/frontend/SyntaxParseHandler.h b/js/src/frontend/SyntaxParseHandler.h
index 895ba6416..7de6a242e 100644
--- a/js/src/frontend/SyntaxParseHandler.h
+++ b/js/src/frontend/SyntaxParseHandler.h
@@ -561,6 +561,10 @@ class SyntaxParseHandler
node == NodeParenthesizedName;
}
+ bool isArgumentsAnyParentheses(Node node, ExclusiveContext* cx) {
+ return node == NodeUnparenthesizedArgumentsName || node == NodeParenthesizedArgumentsName;
+ }
+
bool isEvalAnyParentheses(Node node, ExclusiveContext* cx) {
return node == NodeUnparenthesizedEvalName || node == NodeParenthesizedEvalName;
}
@@ -571,7 +575,7 @@ class SyntaxParseHandler
if (isEvalAnyParentheses(node, cx))
return js_eval_str;
- if (node == NodeUnparenthesizedArgumentsName || node == NodeParenthesizedArgumentsName)
+ if (isArgumentsAnyParentheses(node, cx))
return js_arguments_str;
return nullptr;
}