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

Unified Diff: src/scopes.h

Issue 1180043004: Revert of Add script context with context-allocated "const this" (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 6 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 | « src/scopeinfo.cc ('k') | src/snapshot/snapshot-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 83703716d24e927dfe53a4527b39dde897d3e912..c6baba5e29d07abf52c3b3473349dd16e6a5a7bc 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -355,7 +355,8 @@
// "this" (and no other variable) on the native context. Script scopes then
// will not have a "this" declaration.
bool has_this_declaration() const {
- return (is_function_scope() && !is_arrow_scope()) || is_module_scope();
+ return (is_function_scope() && !is_arrow_scope()) || is_module_scope() ||
+ is_script_scope();
}
// The variable corresponding to the 'new.target' value.
« no previous file with comments | « src/scopeinfo.cc ('k') | src/snapshot/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698