| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 180255f4fd39cca153b7323c0d1c1f990224322e..7e402184b1f5e1c82cc9fa6719ed363f50393e13 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -3223,17 +3223,6 @@
|
| }
|
|
|
|
|
| -MaybeHandle<Object> Object::WriteToReadOnlyElement(Isolate* isolate,
|
| - Handle<Object> receiver,
|
| - uint32_t index,
|
| - Handle<Object> value,
|
| - LanguageMode language_mode) {
|
| - return WriteToReadOnlyProperty(isolate, receiver,
|
| - isolate->factory()->NewNumberFromUint(index),
|
| - value, language_mode);
|
| -}
|
| -
|
| -
|
| MaybeHandle<Object> Object::RedefineNonconfigurableProperty(
|
| Isolate* isolate, Handle<Object> name, Handle<Object> value,
|
| LanguageMode language_mode) {
|
| @@ -3262,11 +3251,12 @@
|
| MaybeHandle<Object> maybe_old;
|
| if (is_observed) maybe_old = it->GetDataValue();
|
|
|
| + Handle<Object> to_assign = value;
|
| // Convert the incoming value to a number for storing into typed arrays.
|
| if (it->IsElement() && (receiver->HasExternalArrayElements() ||
|
| receiver->HasFixedTypedArrayElements())) {
|
| if (!value->IsNumber() && !value->IsUndefined()) {
|
| - ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), value,
|
| + ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), to_assign,
|
| Execution::ToNumber(it->isolate(), value),
|
| Object);
|
| }
|
| @@ -3274,10 +3264,10 @@
|
|
|
| // Possibly migrate to the most up-to-date map that will be able to store
|
| // |value| under it->name().
|
| - it->PrepareForDataProperty(value);
|
| + it->PrepareForDataProperty(to_assign);
|
|
|
| // Write the property value.
|
| - value = it->WriteDataValue(value);
|
| + it->WriteDataValue(to_assign);
|
|
|
| // Send the change record if there are observers.
|
| if (is_observed && !value->SameValue(*maybe_old.ToHandleChecked())) {
|
| @@ -4254,7 +4244,7 @@
|
| DCHECK(!value->IsTheHole());
|
| LookupIterator it(object, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
|
| if (it.state() == LookupIterator::ACCESS_CHECK) {
|
| - if (!it.isolate()->MayAccess(object)) {
|
| + if (!it.HasAccess()) {
|
| return SetPropertyWithFailedAccessCheck(&it, value, SLOPPY);
|
| }
|
| it.Next();
|
| @@ -4277,7 +4267,7 @@
|
| LookupIterator it(isolate, object, index,
|
| LookupIterator::OWN_SKIP_INTERCEPTOR);
|
| if (it.state() == LookupIterator::ACCESS_CHECK) {
|
| - if (!isolate->MayAccess(object)) {
|
| + if (!it.HasAccess()) {
|
| return SetPropertyWithFailedAccessCheck(&it, value, STRICT);
|
| }
|
| it.Next();
|
|
|