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

Unified Diff: src/isolate.cc

Issue 390323002: Remove JSReceiver::GetPrototype and replace it with PrototypeIterator calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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/ic.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « src/ic.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698