Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index a3f4b0b2a53d80ca7d2742590712a014cb141c8e..1e623afc81fa7eba25ecef8081b850efd70f672f 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -6558,11 +6558,10 @@ HInstruction* HOptimizedGraphBuilder::BuildMonomorphicElementAccess( |
// changes could allow callbacks on elements in the chain that |
// aren't compatible with monomorphic keyed stores. |
Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
- Object* holder = map->prototype(); |
- while (holder->GetPrototype(isolate())->IsJSObject()) { |
- holder = holder->GetPrototype(isolate()); |
+ JSObject* holder = JSObject::cast(map->prototype()); |
+ while (!holder->GetPrototype()->IsNull()) { |
+ holder = JSObject::cast(holder->GetPrototype()); |
} |
- ASSERT(holder->GetPrototype(isolate())->IsNull()); |
BuildCheckPrototypeMaps(prototype, |
Handle<JSObject>(JSObject::cast(holder))); |