Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1183)

Unified Diff: src/parsing/preparser.h

Issue 1752753002: Fix bug with multiple directives in the preparser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index b99d9852d19f82974333fe74ff9b7f3fa0def7b8..b98abf86081a173107c2d819236f73db8d81e4cd 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -376,7 +376,8 @@ class PreParserStatement {
}
bool IsStringLiteral() {
- return code_ == kStringLiteralExpressionStatement;
+ return code_ == kStringLiteralExpressionStatement
+ || IsUseStrictLiteral() || IsUseStrongLiteral();
}
bool IsUseStrictLiteral() {
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698