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

Unified Diff: src/objects.cc

Issue 1191813003: Cleanup INTEGER_INDEXED_EXOTIC handling a bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/indexed-integer-exotics.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 718f35e271b582c84298496bf4c8fcf5c84fa2c8..92bddad7837c5d4ea07583a6d28e4058c4fd0c02 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3104,8 +3104,8 @@ MaybeHandle<Object> Object::SetPropertyInternal(LookupIterator* it,
return SetPropertyWithAccessor(it, value, language_mode);
}
case LookupIterator::INTEGER_INDEXED_EXOTIC:
- done = true;
- break;
+ // TODO(verwaest): We should throw an exception.
+ return value;
case LookupIterator::DATA:
if (it->IsReadOnly()) {
@@ -3180,7 +3180,8 @@ MaybeHandle<Object> Object::SetSuperProperty(LookupIterator* it,
break;
case LookupIterator::INTEGER_INDEXED_EXOTIC:
- return result;
+ return RedefineNonconfigurableProperty(it->isolate(), it->GetName(),
+ value, language_mode);
case LookupIterator::DATA: {
PropertyDetails details = own_lookup.property_details();
@@ -3350,7 +3351,7 @@ MaybeHandle<Object> Object::AddDataProperty(LookupIterator* it,
return WriteToReadOnlyProperty(it, value, language_mode);
}
- if (it->state() == LookupIterator::INTEGER_INDEXED_EXOTIC) return value;
+ DCHECK_NE(LookupIterator::INTEGER_INDEXED_EXOTIC, it->state());
Handle<JSObject> receiver = it->GetStoreTarget();
@@ -4181,9 +4182,6 @@ MaybeHandle<Object> JSObject::DefineOwnPropertyIgnoreAttributes(
}
break;
- case LookupIterator::INTEGER_INDEXED_EXOTIC:
- return value;
-
case LookupIterator::ACCESSOR: {
Handle<Object> accessors = it->GetAccessors();
@@ -4236,6 +4234,10 @@ MaybeHandle<Object> JSObject::DefineOwnPropertyIgnoreAttributes(
return value;
}
+ case LookupIterator::INTEGER_INDEXED_EXOTIC:
+ return RedefineNonconfigurableProperty(it->isolate(), it->GetName(),
+ value, STRICT);
+
case LookupIterator::DATA: {
PropertyDetails details = it->property_details();
Handle<Object> old_value = it->factory()->the_hole_value();
« no previous file with comments | « no previous file | test/mjsunit/es6/indexed-integer-exotics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698