Index: src/stub-cache.cc |
diff --git a/src/stub-cache.cc b/src/stub-cache.cc |
index 1f708b3ca63c94f6d7bf49e9c10d66e23f1de8ca..bfed6bbac7f5db4fa5f372b1c3d7554886c1b2ae 100644 |
--- a/src/stub-cache.cc |
+++ b/src/stub-cache.cc |
@@ -1562,6 +1562,7 @@ int CallOptimization::GetPrototypeDepthOfExpectedType( |
while (!object.is_identical_to(holder)) { |
if (object->IsInstanceOf(*expected_receiver_type_)) return depth; |
object = Handle<JSObject>(JSObject::cast(object->GetPrototype())); |
+ if (!object->map()->is_hidden_prototype()) return kInvalidProtoDepth; |
++depth; |
} |
if (holder->IsInstanceOf(*expected_receiver_type_)) return depth; |