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

Unified Diff: src/contexts.cc

Issue 384963002: ES6 Unscopables (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use new GetHolder Created 6 years, 5 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/flag-definitions.h » ('j') | src/runtime.cc » ('J')
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 cb5e852d7d669c07c8d8b950016defff1572f49c..ad7215ff46d1ad462e614fffe43af7cc93187906 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,13 @@ 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()) {
+ LookupIterator it(object, name);
+ *attributes = UnscopableLookup(&it);
} else {
*attributes = JSReceiver::GetPropertyAttributes(object, name);
}
+
if (isolate->has_pending_exception()) return Handle<Object>();
arv (Not doing code reviews) 2014/07/25 15:33:26 Exception is handled here.
Toon Verwaest 2014/07/25 18:52:11 The problem is that it was looking for pending exc
if (*attributes != ABSENT) {
« no previous file with comments | « src/contexts.h ('k') | src/flag-definitions.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698