Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: src/objects.cc

Issue 1979473003: Version 5.1.281.35 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698