Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index ab21e4d373af1e85fb76eb5e3b427f977498faf2..d3fff7a4187090c743da65764b99a05052a441c5 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2156,13 +2156,16 @@ bool Isolate::IsFastArrayConstructorPrototypeChainIntact() { |
// Check that the object prototype hasn't been altered WRT empty elements. |
JSObject* initial_object_proto = JSObject::cast(*initial_object_prototype()); |
- Object* root_array_map_proto = initial_array_proto->GetPrototype(); |
- if (root_array_map_proto != initial_object_proto) return false; |
+ PrototypeIterator iter(this, initial_array_proto); |
+ if (iter.IsAtEnd() || iter.GetCurrent() != initial_object_proto) { |
+ return false; |
+ } |
if (initial_object_proto->elements() != heap()->empty_fixed_array()) { |
return false; |
} |
- return initial_object_proto->GetPrototype()->IsNull(); |
+ iter.Advance(); |
+ return iter.IsAtEnd(); |
} |