| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index a5da88a0b3b2e0b5e44b17e0918d17655ea38e09..af32c7eeaba0e41608145487d9563cf06f99b3ba 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -4307,11 +4307,19 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
|
| return JSProxy::SetProperty(it->GetHolder<JSProxy>(), it->GetName(),
|
| value, it->GetReceiver(), language_mode);
|
|
|
| - case LookupIterator::INTERCEPTOR:
|
| + case LookupIterator::INTERCEPTOR: {
|
| + Handle<Map> store_target_map =
|
| + handle(it->GetStoreTarget()->map(), it->isolate());
|
| if (it->HolderIsReceiverOrHiddenPrototype()) {
|
| Maybe<bool> result =
|
| JSObject::SetPropertyWithInterceptor(it, should_throw, value);
|
| if (result.IsNothing() || result.FromJust()) return result;
|
| + // Interceptor modified the store target but failed to set the
|
| + // property.
|
| + Utils::ApiCheck(*store_target_map == it->GetStoreTarget()->map(),
|
| + it->IsElement() ? "v8::IndexedPropertySetterCallback"
|
| + : "v8::NamedPropertySetterCallback",
|
| + "Interceptor silently changed store target.");
|
| } else {
|
| Maybe<PropertyAttributes> maybe_attributes =
|
| JSObject::GetPropertyAttributesWithInterceptor(it);
|
| @@ -4320,10 +4328,17 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
|
| if ((maybe_attributes.FromJust() & READ_ONLY) != 0) {
|
| return WriteToReadOnlyProperty(it, value, should_throw);
|
| }
|
| + // Interceptor modified the store target but failed to set the
|
| + // property.
|
| + Utils::ApiCheck(*store_target_map == it->GetStoreTarget()->map(),
|
| + it->IsElement() ? "v8::IndexedPropertySetterCallback"
|
| + : "v8::NamedPropertySetterCallback",
|
| + "Interceptor silently changed store target.");
|
| *found = false;
|
| return Nothing<bool>();
|
| }
|
| break;
|
| + }
|
|
|
| case LookupIterator::ACCESSOR: {
|
| if (it->IsReadOnly()) {
|
|
|