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

Unified Diff: src/ast/scopes.h

Issue 1723313002: [parser] Enforce module-specific identifier restriction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Relax assertion criteria Created 4 years, 8 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 | src/parsing/parser.cc » ('j') | test/cctest/test-parsing.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index c3f7d5966545aca637aad7913c86ffb3cf511389..d35a20231519c77fb9a921bc33ac72e62feed411 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -243,7 +243,7 @@ class Scope: public ZoneObject {
// Set the language mode flag (unless disabled by a global flag).
void SetLanguageMode(LanguageMode language_mode) {
- DCHECK(!is_module_scope());
+ DCHECK(!is_module_scope() || is_strict(language_mode));
language_mode_ = language_mode;
}
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | test/cctest/test-parsing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698