Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index cb5e852d7d669c07c8d8b950016defff1572f49c..37156d53bc618d1bb835df6b0a61bd0a71022e77 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -7,6 +7,7 @@ |
#include "src/bootstrapper.h" |
#include "src/debug.h" |
#include "src/scopeinfo.h" |
+#include "src/unscopables.h" |
namespace v8 { |
namespace internal { |
@@ -109,9 +110,14 @@ Handle<Object> Context::Lookup(Handle<String> name, |
if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0 || |
object->IsJSContextExtensionObject()) { |
*attributes = JSReceiver::GetOwnPropertyAttributes(object, name); |
+ } else if (FLAG_harmony_unscopables && context->IsWithContext()) { |
+ bool ok; |
+ Handle<JSReceiver> holder; |
+ *attributes = UnscopableLookup(isolate, object, name, &holder, &ok); |
} else { |
*attributes = JSReceiver::GetPropertyAttributes(object, name); |
} |
+ |
if (isolate->has_pending_exception()) return Handle<Object>(); |
if (*attributes != ABSENT) { |