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

Unified Diff: src/objects.cc

Issue 2622873002: Remove API check for interceptors to notify us of modifying the receiver (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | 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 947a6e076f4b4deb1269c8a8dc703168b20ccae9..e28af2c996c6effd6c8b38231c501c2d6b27f52d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4923,21 +4923,10 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
value, it->GetReceiver(), language_mode);
case LookupIterator::INTERCEPTOR: {
- Handle<Map> store_target_map;
- if (it->GetReceiver()->IsJSObject()) {
- 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.is_null() ||
- *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);
@@ -4945,13 +4934,6 @@ 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.is_null() ||
- *store_target_map == it->GetStoreTarget()->map(),
- it->IsElement() ? "v8::IndexedPropertySetterCallback"
- : "v8::NamedPropertySetterCallback",
- "Interceptor silently changed store target.");
if (maybe_attributes.FromJust() == ABSENT) break;
*found = false;
return Nothing<bool>();
@@ -6841,29 +6823,12 @@ Maybe<bool> JSReceiver::OrdinaryDefineOwnProperty(Isolate* isolate,
// Handle interceptor
if (it.state() == LookupIterator::INTERCEPTOR) {
- Handle<Map> store_target_map;
- if (it.GetReceiver()->IsJSObject()) {
- store_target_map = handle(it.GetStoreTarget()->map(), it.isolate());
- }
if (it.HolderIsReceiverOrHiddenPrototype()) {
Maybe<bool> result = DefinePropertyWithInterceptorInternal(
&it, it.GetInterceptor(), should_throw, *desc);
if (result.IsNothing() || result.FromJust()) {
return result;
}
- // Interceptor modified the store target but failed to set the
- // property.
- if (!store_target_map.is_null() &&
- *store_target_map != it.GetStoreTarget()->map()) {
- it.isolate()->PushStackTraceAndDie(
- 0xabababaa, v8::ToCData<void*>(it.GetInterceptor()->definer()),
- nullptr, 0xabababab);
- }
- Utils::ApiCheck(store_target_map.is_null() ||
- *store_target_map == it.GetStoreTarget()->map(),
- it.IsElement() ? "v8::IndexedPropertyDefinerCallback"
- : "v8::NamedPropertyDefinerCallback",
- "Interceptor silently changed store target.");
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698