| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index baec0b737816e85cb737ca7e1737a179b7867f8d..812f336db8f38bee3d6bf38ea57d9cfc86865d8a 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -1529,7 +1529,7 @@ MaybeHandle<Object> Object::ArraySpeciesConstructor(
|
| return default_species;
|
| }
|
| if (original_array->IsJSArray() &&
|
| - Handle<JSReceiver>::cast(original_array)->map()->new_target_is_base() &&
|
| + Handle<JSArray>::cast(original_array)->HasArrayPrototype(isolate) &&
|
| isolate->IsArraySpeciesLookupChainIntact()) {
|
| return default_species;
|
| }
|
| @@ -15613,16 +15613,6 @@ Maybe<bool> JSObject::SetPrototype(Handle<JSObject> object,
|
| ShouldThrow should_throw) {
|
| Isolate* isolate = object->GetIsolate();
|
|
|
| - // Setting the prototype of an Array instance invalidates the species
|
| - // protector
|
| - // because it could change the constructor property of the instance, which
|
| - // could change the @@species constructor.
|
| - if (object->IsJSArray() && isolate->IsArraySpeciesLookupChainIntact()) {
|
| - isolate->CountUsage(
|
| - v8::Isolate::UseCounterFeature::kArrayInstanceProtoModified);
|
| - isolate->InvalidateArraySpeciesProtector();
|
| - }
|
| -
|
| const bool observed = from_javascript && object->map()->is_observed();
|
| Handle<Object> old_value;
|
| if (observed) {
|
|
|