| Index: src/accessors.cc
|
| diff --git a/src/accessors.cc b/src/accessors.cc
|
| index 6ade56aaee7ad3d1eb09240194b44d4d5e7d3da7..eb7e372851ae8c4a377c696066beee59bc0c5e4b 100644
|
| --- a/src/accessors.cc
|
| +++ b/src/accessors.cc
|
| @@ -191,16 +191,7 @@ void Accessors::ArrayLengthSetter(
|
| Handle<JSObject> object = Handle<JSObject>::cast(
|
| Utils::OpenHandle(*info.This()));
|
| Handle<Object> value = Utils::OpenHandle(*val);
|
| - // This means one of the object's prototypes is a JSArray and the
|
| - // object does not have a 'length' property. Calling SetProperty
|
| - // causes an infinite loop.
|
| - if (!object->IsJSArray()) {
|
| - MaybeHandle<Object> maybe_result =
|
| - JSObject::SetOwnPropertyIgnoreAttributes(
|
| - object, isolate->factory()->length_string(), value, NONE);
|
| - maybe_result.Check();
|
| - return;
|
| - }
|
| + ASSERT(object->IsJSArray());
|
|
|
| value = FlattenNumber(isolate, value);
|
|
|
| @@ -871,13 +862,7 @@ static Handle<Object> SetFunctionPrototype(Isolate* isolate,
|
| function = Handle<JSFunction>(function_raw, isolate);
|
| }
|
|
|
| - if (!function->should_have_prototype()) {
|
| - // Since we hit this accessor, object will have no prototype property.
|
| - MaybeHandle<Object> maybe_result =
|
| - JSObject::SetOwnPropertyIgnoreAttributes(
|
| - receiver, isolate->factory()->prototype_string(), value, NONE);
|
| - return maybe_result.ToHandleChecked();
|
| - }
|
| + ASSERT(function->should_have_prototype());
|
|
|
| Handle<Object> old_value;
|
| bool is_observed = *function == *receiver && function->map()->is_observed();
|
|
|