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

Unified Diff: src/api.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 | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index ddd87d5c41a885de27e5a2b60339d53c3856bab5..9544a0e32ccda78f9e5d949890ec07bcd121c29a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3526,11 +3526,11 @@ Maybe<bool> v8::Object::DefineOwnProperty(v8::Local<v8::Context> context,
desc.set_enumerable(!(attributes & v8::DontEnum));
desc.set_configurable(!(attributes & v8::DontDelete));
desc.set_value(value_obj);
- bool success = i::JSReceiver::DefineOwnProperty(isolate, self, key_obj, &desc,
- i::Object::DONT_THROW);
+ Maybe<bool> success = i::JSReceiver::DefineOwnProperty(
+ isolate, self, key_obj, &desc, i::Object::DONT_THROW);
// Even though we said DONT_THROW, there might be accessors that do throw.
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
- return Just(success);
+ return success;
}
@@ -3669,11 +3669,11 @@ MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context,
i::Handle<i::String> key_name = Utils::OpenHandle(*key);
i::PropertyDescriptor desc;
- bool found =
+ Maybe<bool> found =
i::JSReceiver::GetOwnPropertyDescriptor(isolate, obj, key_name, &desc);
- has_pending_exception = isolate->has_pending_exception();
+ has_pending_exception = found.IsNothing();
RETURN_ON_FAILED_EXECUTION(Value);
- if (!found) {
+ if (!found.FromJust()) {
return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
}
RETURN_ESCAPED(Utils::ToLocal(desc.ToObject(isolate)));
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698