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

Unified Diff: src/contexts.cc

Issue 1382513003: Test for var declarations in eval which conflict with let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mask out eval bit Created 5 years, 2 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/contexts.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index a008d49ac37ebfdf9e47cdcb995eac2fba591918..a18f181bef8ccb3e0ca80d43dc5a1f3107105d73 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -264,7 +264,8 @@ Handle<Object> Context::Lookup(Handle<String> name,
}
// 1. Check global objects, subjects of with, and extension objects.
- if ((context->IsNativeContext() || context->IsWithContext() ||
+ if ((context->IsNativeContext() ||
+ (context->IsWithContext() && ((flags & SKIP_WITH_CONTEXT) == 0)) ||
context->IsFunctionContext() || context->IsBlockContext()) &&
context->extension_receiver() != nullptr) {
Handle<JSReceiver> object(context->extension_receiver());
@@ -384,7 +385,9 @@ Handle<Object> Context::Lookup(Handle<String> name,
}
// 3. Prepare to continue with the previous (next outermost) context.
- if (context->IsNativeContext()) {
+ if (context->IsNativeContext() ||
+ ((flags & STOP_AT_DECLARATION_SCOPE) != 0 &&
+ context->is_declaration_context())) {
follow_context_chain = false;
} else {
context = Handle<Context>(context->previous(), isolate);
« no previous file with comments | « src/contexts.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698