| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index 2607bb3b68d53405be03865fe60538dea4e8b9e0..61408186ac73cd409a1b633eecd6ce258819f4c7 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -1699,7 +1699,12 @@ MaybeObject* KeyedStoreIC::Store(Handle<Object> object,
|
| if (!(receiver->map()->DictionaryElementsInPrototypeChainOnly())) {
|
| KeyedAccessStoreMode store_mode =
|
| GetStoreMode(receiver, key, value);
|
| - stub = StoreElementStub(receiver, store_mode);
|
| + // Use the generic stub if the store would send the receiver to
|
| + // dictionary mode.
|
| + if (!IsGrowStoreMode(store_mode) ||
|
| + !receiver->WouldConvertToSlowElements(key)) {
|
| + stub = StoreElementStub(receiver, store_mode);
|
| + }
|
| }
|
| }
|
| }
|
|
|