Index: src/stub-cache.h |
diff --git a/src/stub-cache.h b/src/stub-cache.h |
index f858e4722a2ded4868877034f3494977d66cccde..98d218bb52aad3948eb417ac25a618b1235394e5 100644 |
--- a/src/stub-cache.h |
+++ b/src/stub-cache.h |
@@ -919,10 +919,11 @@ class CallOptimization BASE_EMBEDDED { |
return api_call_info_; |
} |
- // Returns the depth of the object having the expected type in the |
- // prototype chain between the two arguments. |
- int GetPrototypeDepthOfExpectedType(Handle<JSObject> object, |
- Handle<JSObject> holder) const; |
+ bool IsCompatibleReceiver(Handle<Object> receiver) const { |
+ ASSERT(is_simple_api_call()); |
+ return expected_receiver_type_.is_null() || |
+ receiver->IsInstanceOf(*expected_receiver_type_); |
+ } |
private: |
void Initialize(Handle<JSFunction> function); |