Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 066b3b45aab85507c35c8b0e7f5b952cd5dd9e5d..bafaffff7eaf5cf7392eb5cf3b19d93e46f8d592 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -227,7 +227,6 @@ bool IC::AddressIsOptimizedCode() const { |
return host->kind() == Code::OPTIMIZED_FUNCTION; |
} |
- |
static void LookupForRead(LookupIterator* it) { |
for (; it->IsFound(); it->Next()) { |
switch (it->state()) { |
@@ -641,6 +640,9 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) { |
} |
} |
+ if (state() != UNINITIALIZED) { |
+ JSObject::MakePrototypesFast(object, kStartAtReceiver, isolate()); |
+ } |
// Named lookup in the object. |
LookupIterator it(object, name); |
LookupForRead(&it); |
@@ -1530,6 +1532,9 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name, |
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name); |
} |
+ if (state() != UNINITIALIZED) { |
+ JSObject::MakePrototypesFast(object, kStartAtPrototype, isolate()); |
+ } |
LookupIterator it(object, name); |
if (FLAG_use_ic) UpdateCaches(&it, value, store_mode); |