Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index 134ef8b843fbff585aa05ada077b5a919eca7a06..374d5154f80a073621f77f50fe768d8c92d4484e 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -993,6 +993,7 @@ void LoadIC::UpdateCaches(LookupResult* lookup, |
Handle<AccessorInfo> callback = |
Handle<AccessorInfo>::cast(callback_object); |
if (v8::ToCData<Address>(callback->getter()) == 0) return; |
+ if (!callback->IsCompatibleReceiver(*receiver)) return; |
code = isolate()->stub_cache()->ComputeLoadCallback( |
name, receiver, holder, callback); |
break; |
@@ -1256,6 +1257,7 @@ void KeyedLoadIC::UpdateCaches(LookupResult* lookup, |
Handle<AccessorInfo> callback = |
Handle<AccessorInfo>::cast(callback_object); |
if (v8::ToCData<Address>(callback->getter()) == 0) return; |
+ if (!callback->IsCompatibleReceiver(*receiver)) return; |
code = isolate()->stub_cache()->ComputeKeyedLoadCallback( |
name, receiver, holder, callback); |
break; |
@@ -1470,6 +1472,7 @@ void StoreIC::UpdateCaches(LookupResult* lookup, |
Handle<AccessorInfo> callback = |
Handle<AccessorInfo>::cast(callback_object); |
if (v8::ToCData<Address>(callback->setter()) == 0) return; |
+ ASSERT(callback->IsCompatibleReceiver(*receiver)); |
code = isolate()->stub_cache()->ComputeStoreCallback( |
name, receiver, callback, strict_mode); |
break; |