Reviewers: Igor Sheludko, jochen,
Message:
ptal
@jochen: fyi
Description:
Query the existince of an element on the interceptor before trying to
delete it.
The deleter doesn't inform us whether it actually deleted something.
BUG=v8:4137
LOG=n
Please review this at https://codereview.chromium.org/1180073002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+7, -0 lines):
M src/objects.cc
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
ac3934155ddfb27ec4ce86e739203d3baa25f4c5..365f7eef2e51e084eb4aee3528baaf298b29ae50
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5083,6 +5083,13 @@ MaybeHandle<Object>
JSObject::DeletePropertyWithInterceptor(
v8::Handle<v8::Boolean> result;
if (it->IsElement()) {
uint32_t index = it->index();
+ // 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>();
+
v8::IndexedPropertyDeleterCallback deleter =
v8::ToCData<v8::IndexedPropertyDeleterCallback>(interceptor->deleter());
LOG(isolate,
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.