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

Unified Diff: src/objects-inl.h

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/objects.cc ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 91c2945f0e6e33f1def67e6ff6de3beb5bb00997..a5b2b352d79174ac87f08b4f6bc2d6e5f349f3a9 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6961,7 +6961,7 @@ Maybe<bool> JSReceiver::HasProperty(Handle<JSReceiver> object,
return JSProxy::HasPropertyWithHandler(proxy, name);
}
Maybe<PropertyAttributes> result = GetPropertyAttributes(object, name);
- return result.has_value ? Just(result.value != ABSENT) : Nothing<bool>();
+ return result.IsJust() ? Just(result.FromJust() != ABSENT) : Nothing<bool>();
}
@@ -6972,7 +6972,7 @@ Maybe<bool> JSReceiver::HasOwnProperty(Handle<JSReceiver> object,
return JSProxy::HasPropertyWithHandler(proxy, name);
}
Maybe<PropertyAttributes> result = GetOwnPropertyAttributes(object, name);
- return result.has_value ? Just(result.value != ABSENT) : Nothing<bool>();
+ return result.IsJust() ? Just(result.FromJust() != ABSENT) : Nothing<bool>();
}
@@ -7031,7 +7031,7 @@ Maybe<bool> JSReceiver::HasElement(Handle<JSReceiver> object, uint32_t index) {
}
Maybe<PropertyAttributes> result = JSObject::GetElementAttributeWithReceiver(
Handle<JSObject>::cast(object), object, index, true);
- return result.has_value ? Just(result.value != ABSENT) : Nothing<bool>();
+ return result.IsJust() ? Just(result.FromJust() != ABSENT) : Nothing<bool>();
}
@@ -7043,7 +7043,7 @@ Maybe<bool> JSReceiver::HasOwnElement(Handle<JSReceiver> object,
}
Maybe<PropertyAttributes> result = JSObject::GetElementAttributeWithReceiver(
Handle<JSObject>::cast(object), object, index, false);
- return result.has_value ? Just(result.value != ABSENT) : Nothing<bool>();
+ return result.IsJust() ? Just(result.FromJust() != ABSENT) : Nothing<bool>();
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698