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

Unified Diff: src/api.cc

Issue 1479543002: [proxies] Implement [[Delete]]. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo Created 5 years, 1 month 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') | test/mjsunit/harmony/proxies-delete-property.js » ('J')
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 ac9de3df1e2b38764044bc0ca1ba03747b64e9a5..6ccf7565e7d34384a67cad169c0950f4df92e726 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3879,12 +3879,11 @@ Maybe<bool> v8::Object::Delete(Local<Context> context, Local<Value> key) {
PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::Delete()", bool);
auto self = Utils::OpenHandle(this);
auto key_obj = Utils::OpenHandle(*key);
- i::Handle<i::Object> obj;
- has_pending_exception =
- !i::Runtime::DeleteObjectProperty(isolate, self, key_obj, i::SLOPPY)
- .ToHandle(&obj);
+ Maybe<bool> result =
+ i::Runtime::DeleteObjectProperty(isolate, self, key_obj, i::SLOPPY);
+ has_pending_exception = result.IsNothing();
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
- return Just(obj->IsTrue());
+ return result;
}
@@ -3937,11 +3936,10 @@ Maybe<bool> v8::Object::Delete(Local<Context> context, uint32_t index) {
PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::DeleteProperty()",
bool);
auto self = Utils::OpenHandle(this);
- i::Handle<i::Object> obj;
- has_pending_exception =
- !i::JSReceiver::DeleteElement(self, index).ToHandle(&obj);
+ Maybe<bool> result = i::JSReceiver::DeleteElement(self, index);
+ has_pending_exception = result.IsNothing();
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
- return Just(obj->IsTrue());
+ return result;
}
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | test/mjsunit/harmony/proxies-delete-property.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698