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

Unified Diff: src/objects.cc

Issue 1711813003: [classes] Support AccessorInfo-style data properties in super property stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/mjsunit/es6/classes-super.js » ('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 d565cbb8ea1a01b8aa7d6d5199394c7609342848..19dc7d6c4cec6e092586cd582aaa4fa6fd481655 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4283,8 +4283,16 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
}
break;
- case LookupIterator::INTEGER_INDEXED_EXOTIC:
case LookupIterator::ACCESSOR:
+ if (own_lookup.GetAccessors()->IsAccessorInfo()) {
+ if (own_lookup.IsReadOnly()) {
+ return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
+ }
+ return JSObject::SetPropertyWithAccessor(&own_lookup, value,
+ should_throw);
+ }
+ // Fall through.
+ case LookupIterator::INTEGER_INDEXED_EXOTIC:
return RedefineIncompatibleProperty(isolate, it->GetName(), value,
should_throw);
« no previous file with comments | « no previous file | test/mjsunit/es6/classes-super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698