Chromium Code Reviews| Index: src/ic.cc |
| diff --git a/src/ic.cc b/src/ic.cc |
| index 3897f884500146c025e595c7451a46f262d8e7b9..ef786ff13483ba4eca6ae1380a3c82c5c79ad6b4 100644 |
| --- a/src/ic.cc |
| +++ b/src/ic.cc |
| @@ -1794,6 +1794,17 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object, |
| } |
| } |
| + Handle<Object> result; |
| + |
| + if (store_handle.is_null()) { |
| + ASSIGN_RETURN_ON_EXCEPTION( |
| + isolate(), |
| + result, |
|
Michael Starzinger
2014/05/21 12:34:36
nit: We should be able to assign to store_handle h
ulan
2014/05/21 14:52:22
Done.
|
| + Runtime::SetObjectProperty( |
| + isolate(), object, key, value, NONE, strict_mode()), |
|
Michael Starzinger
2014/05/21 12:34:36
nit: Only one white-space in front of NONE here.
ulan
2014/05/21 14:52:22
Done.
|
| + Object); |
| + } |
| + |
| if (!is_target_set()) { |
| if (*stub == *generic_stub()) { |
| TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "set generic"); |
| @@ -1803,15 +1814,7 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object, |
| TRACE_IC("StoreIC", key); |
| } |
| - if (!store_handle.is_null()) return store_handle; |
| - Handle<Object> result; |
| - ASSIGN_RETURN_ON_EXCEPTION( |
| - isolate(), |
| - result, |
| - Runtime::SetObjectProperty( |
| - isolate(), object, key, value, NONE, strict_mode()), |
| - Object); |
| - return result; |
| + return store_handle.is_null() ? result : store_handle; |
| } |