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

Unified Diff: src/objects.cc

Issue 1180073002: Introduce DefineOwnPropertyIgnoreAttributes and make it call SetPropertyWithInterceptor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index ac3934155ddfb27ec4ce86e739203d3baa25f4c5..e8e4b20074963054f9a5d6211000f2c48fb9971a 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5078,11 +5078,19 @@ MaybeHandle<Object> JSObject::DeletePropertyWithInterceptor(
Handle<JSObject> holder = it->GetHolder<JSObject>();
+ // TODO(verwaest): Temporary workaround for blink pretending to delete
+ // elements that don't actually exist.
+ Maybe<PropertyAttributes> attributes =
+ GetPropertyAttributesWithInterceptor(it);
+ CHECK(attributes.IsJust());
+ if (attributes.FromJust() == ABSENT) return MaybeHandle<Object>();
+
PropertyCallbackArguments args(isolate, interceptor->data(),
*it->GetReceiver(), *holder);
v8::Handle<v8::Boolean> result;
if (it->IsElement()) {
uint32_t index = it->index();
+
Igor Sheludko 2015/06/12 10:05:25 Spurious change.
v8::IndexedPropertyDeleterCallback deleter =
v8::ToCData<v8::IndexedPropertyDeleterCallback>(interceptor->deleter());
LOG(isolate,
« no previous file with comments | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698