Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 1100adb3fc98d2bee567ea5ed65e78ed7d96d219..01b7a90d719ea66f6d587f7dd5addbad85d2a219 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4131,7 +4131,7 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it, |
LanguageMode language_mode, |
StoreFromKeyed store_mode, |
bool* found) { |
- DCHECK(it->IsFound()); |
+ it->UpdateProtector(); |
ShouldThrow should_throw = |
is_sloppy(language_mode) ? DONT_THROW : THROW_ON_ERROR; |
@@ -4139,7 +4139,7 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it, |
// interceptor calls. |
AssertNoContextChange ncc(it->isolate()); |
- do { |
+ for (; it->IsFound(); it->Next()) { |
switch (it->state()) { |
case LookupIterator::NOT_FOUND: |
UNREACHABLE(); |
@@ -4202,8 +4202,7 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it, |
*found = false; |
return Nothing<bool>(); |
} |
- it->Next(); |
- } while (it->IsFound()); |
+ } |
*found = false; |
return Nothing<bool>(); |
@@ -4213,13 +4212,10 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it, |
Maybe<bool> Object::SetProperty(LookupIterator* it, Handle<Object> value, |
LanguageMode language_mode, |
StoreFromKeyed store_mode) { |
- it->UpdateProtector(); |
- if (it->IsFound()) { |
- bool found = true; |
- Maybe<bool> result = |
- SetPropertyInternal(it, value, language_mode, store_mode, &found); |
- if (found) return result; |
- } |
+ bool found = true; |
+ Maybe<bool> result = |
+ SetPropertyInternal(it, value, language_mode, store_mode, &found); |
+ if (found) return result; |
// If the receiver is the JSGlobalObject, the store was contextual. In case |
// the property did not exist yet on the global object itself, we have to |
@@ -4241,13 +4237,10 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value, |
StoreFromKeyed store_mode) { |
Isolate* isolate = it->isolate(); |
- it->UpdateProtector(); |
- if (it->IsFound()) { |
- bool found = true; |
- Maybe<bool> result = |
- SetPropertyInternal(it, value, language_mode, store_mode, &found); |
- if (found) return result; |
- } |
+ bool found = true; |
+ Maybe<bool> result = |
+ SetPropertyInternal(it, value, language_mode, store_mode, &found); |
+ if (found) return result; |
// The property either doesn't exist on the holder or exists there as a data |
// property. |
@@ -4322,7 +4315,8 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value, |
} |
} |
- return AddDataProperty(&own_lookup, value, NONE, should_throw, store_mode); |
+ return JSObject::AddDataProperty(&own_lookup, value, NONE, should_throw, |
+ store_mode); |
} |
MaybeHandle<Object> Object::ReadAbsentProperty(LookupIterator* it) { |
@@ -8381,8 +8375,9 @@ bool Map::OnlyHasSimpleProperties() { |
// Wrapped string elements aren't explicitly stored in the elements backing |
// store, but are loaded indirectly from the underlying string. |
return !IsStringWrapperElementsKind(elements_kind()) && |
- instance_type() > LAST_SPECIAL_RECEIVER_TYPE && |
- !has_hidden_prototype() && !is_dictionary_map(); |
+ !is_access_check_needed() && !has_named_interceptor() && |
+ !has_indexed_interceptor() && !has_hidden_prototype() && |
+ !is_dictionary_map(); |
} |
namespace { |