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

Unified Diff: src/scopeinfo.cc

Issue 1097283003: Resolve references to "this" the same way as normal variables (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: All TF tests passing Created 5 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
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 99d4c38297890a22631e33a1aa1aa3cce1add481..993e2a5eaddd4884c0e2a442b21a9499e24548e6 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -307,7 +307,8 @@ bool ScopeInfo::LocalIsSynthetic(int var) {
// with user declarations, the current temporaries like .generator_object and
// .result start with a dot, so we can use that as a flag. It's a hack!
Handle<String> name(LocalName(var));
- return name->length() > 0 && name->Get(0) == '.';
+ return (name->length() > 0 && name->Get(0) == '.') ||
+ name->Equals(*GetIsolate()->factory()->this_string());
}

Powered by Google App Engine
This is Rietveld 408576698