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

Unified Diff: src/contexts.cc

Issue 807893002: ES6: Update unscopables to match spec (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 6 years 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 | « no previous file | test/mjsunit/es6/unscopables.js » ('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 992a8495e05e77a2427704897bfd3f99b6028a63..57490a118f5d9663ab55d6bb95a0ed4890ff3688 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -134,13 +134,14 @@ static Maybe<PropertyAttributes> UnscopableLookup(LookupIterator* it) {
return Maybe<PropertyAttributes>();
}
if (!unscopables->IsSpecObject()) return attrs;
- Maybe<bool> blacklist = JSReceiver::HasProperty(
- Handle<JSReceiver>::cast(unscopables), it->name());
- if (!blacklist.has_value) {
+ Handle<Object> blacklist;
+ MaybeHandle<Object> maybe_blacklist =
+ Object::GetProperty(unscopables, it->name());
+ if (!maybe_blacklist.ToHandle(&blacklist)) {
DCHECK(isolate->has_pending_exception());
return Maybe<PropertyAttributes>();
}
- if (blacklist.value) return maybe(ABSENT);
+ if (!blacklist->IsUndefined()) return maybe(ABSENT);
return attrs;
}
« no previous file with comments | « no previous file | test/mjsunit/es6/unscopables.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698