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. |