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

Unified Diff: src/objects.cc

Issue 1424233005: Fix another corner-case behavior of Object::SetSuperProperty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 1 month 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/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 7422aec4e6603ddbbf52a3295a9fea13e8da9b6b..fa3ce5307c4d2da7d65563e8d14158020f8fa3c8 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3766,11 +3766,11 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
case LookupIterator::DATA: {
PropertyDetails details = own_lookup.property_details();
- if (details.IsConfigurable() || !details.IsReadOnly()) {
- return JSObject::DefineOwnPropertyIgnoreAttributes(
- &own_lookup, value, details.attributes(), should_throw);
+ if (details.IsReadOnly()) {
+ return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
}
- return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
+ return JSObject::DefineOwnPropertyIgnoreAttributes(
+ &own_lookup, value, details.attributes(), should_throw);
Toon Verwaest 2015/11/03 12:06:52 Won't this just SetDataProperty(it, value, THROW_O
neis 2015/11/03 12:56:07 Not THROW_ON_ERROR, but yeah, looks like this will
}
case LookupIterator::ACCESSOR: {
« no previous file with comments | « no previous file | test/mjsunit/es6/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698