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

Unified Diff: src/contexts.cc

Issue 958053003: Removed funky Maybe constructor and made fields private. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ast.h ('k') | src/hydrogen.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 aa50021656049726694074a911c232ad6604807f..c6cb94ad145dffcaca69b8f77663a95e81b9ac86 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -122,8 +122,8 @@ static Maybe<PropertyAttributes> UnscopableLookup(LookupIterator* it) {
Isolate* isolate = it->isolate();
Maybe<PropertyAttributes> attrs = JSReceiver::GetPropertyAttributes(it);
- DCHECK(attrs.has_value || isolate->has_pending_exception());
- if (!attrs.has_value || attrs.value == ABSENT) return attrs;
+ DCHECK(attrs.IsJust() || isolate->has_pending_exception());
+ if (!attrs.IsJust() || attrs.FromJust() == ABSENT) return attrs;
Handle<Symbol> unscopables_symbol = isolate->factory()->unscopables_symbol();
Handle<Object> receiver = it->GetReceiver();
@@ -264,11 +264,11 @@ Handle<Object> Context::Lookup(Handle<String> name,
maybe = JSReceiver::GetPropertyAttributes(object, name);
}
- if (!maybe.has_value) return Handle<Object>();
+ if (!maybe.IsJust()) return Handle<Object>();
DCHECK(!isolate->has_pending_exception());
- *attributes = maybe.value;
+ *attributes = maybe.FromJust();
- if (maybe.value != ABSENT) {
+ if (maybe.FromJust() != ABSENT) {
if (FLAG_trace_contexts) {
PrintF("=> found property in context object %p\n",
reinterpret_cast<void*>(*object));
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698