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

Unified Diff: src/key-accumulator.cc

Issue 1513713002: [cleanup] [proxies] Unify style of recently written code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 5 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 | « src/key-accumulator.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/key-accumulator.cc
diff --git a/src/key-accumulator.cc b/src/key-accumulator.cc
index 9951636963d29d458c80ee4ab946e49f20f0dcd7..e7a9c3ccebccd3ba56b7a87b6cc7c1f9148deae7 100644
--- a/src/key-accumulator.cc
+++ b/src/key-accumulator.cc
@@ -234,10 +234,10 @@ MaybeHandle<FixedArray> FilterProxyKeys(Isolate* isolate, Handle<JSProxy> owner,
if (key->FilterKey(filter)) continue; // Skip this key.
if (filter & ONLY_ENUMERABLE) {
PropertyDescriptor desc;
- bool found =
+ Maybe<bool> found =
JSProxy::GetOwnPropertyDescriptor(isolate, owner, key, &desc);
- if (isolate->has_pending_exception()) return MaybeHandle<FixedArray>();
- if (!found || !desc.enumerable()) continue; // Skip this key.
+ MAYBE_RETURN(found, MaybeHandle<FixedArray>());
+ if (!found.FromJust() || !desc.enumerable()) continue; // Skip this key.
}
// Keep this key.
if (store_position != i) {
@@ -251,11 +251,12 @@ MaybeHandle<FixedArray> FilterProxyKeys(Isolate* isolate, Handle<JSProxy> owner,
}
-// Returns "false" in case of exception, "true" on success.
-bool KeyAccumulator::AddKeysFromProxy(Handle<JSProxy> proxy,
- Handle<FixedArray> keys) {
+// Returns "nothing" in case of exception, "true" on success.
+Maybe<bool> KeyAccumulator::AddKeysFromProxy(Handle<JSProxy> proxy,
+ Handle<FixedArray> keys) {
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate_, keys, FilterProxyKeys(isolate_, proxy, keys, filter_), false);
+ isolate_, keys, FilterProxyKeys(isolate_, proxy, keys, filter_),
+ Nothing<bool>());
// Proxies define a complete list of keys with no distinction of
// elements and properties, which breaks the normal assumption for the
// KeyAccumulator.
@@ -264,7 +265,7 @@ bool KeyAccumulator::AddKeysFromProxy(Handle<JSProxy> proxy,
// element keys for this level. Otherwise we would not fully respect the order
// given by the proxy.
level_string_length_ = -level_string_length_;
- return true;
+ return Just(true);
}
« no previous file with comments | « src/key-accumulator.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698