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

Unified Diff: src/objects.cc

Issue 1138483005: Reland "Mark internal AccessorInfo properties as 'special data properties'" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « src/objects.h ('k') | src/objects-inl.h » ('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 703ba4aeb0d4fb0fe41c32511ad37010b9960a82..5bd67af52d6cdeb7f49d286314e0beb48389487b 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3215,14 +3215,21 @@ MaybeHandle<Object> Object::SetPropertyInternal(LookupIterator* it,
}
break;
- case LookupIterator::ACCESSOR:
+ case LookupIterator::ACCESSOR: {
if (it->property_details().IsReadOnly()) {
return WriteToReadOnlyProperty(it, value, language_mode);
}
+ Handle<Object> accessors = it->GetAccessors();
+ if (accessors->IsAccessorInfo() &&
+ !it->HolderIsReceiverOrHiddenPrototype() &&
+ AccessorInfo::cast(*accessors)->is_special_data_property()) {
+ done = true;
+ break;
+ }
return SetPropertyWithAccessor(it->GetReceiver(), it->name(), value,
- it->GetHolder<JSObject>(),
- it->GetAccessors(), language_mode);
-
+ it->GetHolder<JSObject>(), accessors,
+ language_mode);
+ }
case LookupIterator::INTEGER_INDEXED_EXOTIC:
done = true;
break;
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698