| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 13123f19005cdd39de8615e95cf6e11b2366343b..563c976e890ca1d3342736c314c1a4a010ac786e 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -1564,7 +1564,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;
|
| }
|
| @@ -14926,16 +14926,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();
|
| - }
|
| -
|
| #ifdef DEBUG
|
| int size = object->Size();
|
| #endif
|
|
|