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

Unified Diff: src/api.cc

Issue 854493004: Remove ForceDelete (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « include/v8.h ('k') | src/elements.h » ('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 3f6e1090a05633df5c666dededd19ab0c969157b..89243c2d3a8de1c00778122e5a3af93dc695d172 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3037,7 +3037,7 @@ bool v8::Object::SetPrivate(v8::Handle<Private> key, v8::Handle<Value> value) {
i::MaybeHandle<i::Object> DeleteObjectProperty(
i::Isolate* isolate, i::Handle<i::JSReceiver> receiver,
- i::Handle<i::Object> key, i::JSReceiver::DeleteMode mode) {
+ i::Handle<i::Object> key, i::StrictMode strict_mode) {
// Check if the given key is an array index.
uint32_t index;
if (key->ToArrayIndex(&index)) {
@@ -3051,7 +3051,7 @@ i::MaybeHandle<i::Object> DeleteObjectProperty(
return isolate->factory()->true_value();
}
- return i::JSReceiver::DeleteElement(receiver, index, mode);
+ return i::JSReceiver::DeleteElement(receiver, index, strict_mode);
}
i::Handle<i::Name> name;
@@ -3069,25 +3069,7 @@ i::MaybeHandle<i::Object> DeleteObjectProperty(
if (name->IsString()) {
name = i::String::Flatten(i::Handle<i::String>::cast(name));
}
- return i::JSReceiver::DeleteProperty(receiver, name, mode);
-}
-
-
-bool v8::Object::ForceDelete(v8::Handle<Value> key) {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- ON_BAILOUT(isolate, "v8::Object::ForceDelete()", return false);
- ENTER_V8(isolate);
- i::HandleScope scope(isolate);
- i::Handle<i::JSObject> self = Utils::OpenHandle(this);
- i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
-
- EXCEPTION_PREAMBLE(isolate);
- i::Handle<i::Object> obj;
- has_pending_exception =
- !DeleteObjectProperty(isolate, self, key_obj,
- i::JSReceiver::FORCE_DELETION).ToHandle(&obj);
- EXCEPTION_BAILOUT_CHECK(isolate, false);
- return obj->IsTrue();
+ return i::JSReceiver::DeleteProperty(receiver, name, strict_mode);
}
@@ -3391,8 +3373,7 @@ bool v8::Object::Delete(v8::Handle<Value> key) {
EXCEPTION_PREAMBLE(isolate);
i::Handle<i::Object> obj;
has_pending_exception =
- !DeleteObjectProperty(isolate, self, key_obj,
- i::JSReceiver::NORMAL_DELETION).ToHandle(&obj);
+ !DeleteObjectProperty(isolate, self, key_obj, i::SLOPPY).ToHandle(&obj);
EXCEPTION_BAILOUT_CHECK(isolate, false);
return obj->IsTrue();
}
« no previous file with comments | « include/v8.h ('k') | src/elements.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698