Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 17d4ee211e69539d82804171fe94f2f71940c67d..68c11596ebae2509984ceb0a5246cd61b356b02c 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -1747,6 +1747,8 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, |
if (holder->IsGlobalObject()) { |
Handle<PropertyCell> cell = lookup->GetPropertyCell(); |
Handle<HeapType> union_type = PropertyCell::UpdatedType(cell, value); |
+ DCHECK(holder.is_identical_to(receiver) || |
+ receiver->map()->prototype() == *holder); |
StoreGlobalStub stub(isolate(), union_type->IsConstant(), |
receiver->IsJSGlobalProxy()); |
Handle<Code> code = stub.GetCodeCopyFromTemplate( |