Chromium Code Reviews| Index: src/ic.cc |
| diff --git a/src/ic.cc b/src/ic.cc |
| index a15863e1415955cb2824093df138acaf43e1cca2..f84b3b9248eae2b7061ef2f181ab24214cc9426f 100644 |
| --- a/src/ic.cc |
| +++ b/src/ic.cc |
| @@ -1662,12 +1662,14 @@ MaybeObject* StoreIC::Store(State state, |
| // Use specialized code for setting the length of arrays with fast |
| // properties. Slow properties might indicate redefinition of the length |
| - // property. |
| + // property. Note that when redefined using Object.freeze, it's possible |
| + // to have fast properties but a read-only length. |
| if (FLAG_use_ic && |
| receiver->IsJSArray() && |
| name->Equals(isolate()->heap()->length_string()) && |
| Handle<JSArray>::cast(receiver)->AllowsSetElementsLength() && |
| - receiver->HasFastProperties()) { |
| + receiver->HasFastProperties() && |
| + !receiver->map()->is_frozen()) { |
|
Mark Miller
2013/07/12 20:56:57
The issue also arises if the .length property is n
adamk
2013/07/12 21:00:09
See the comment above, and my note in the CL descr
Mark Miller
2013/07/12 21:08:02
Gotcha. Thanks for the clarification.
Does that m
Mark Miller
2013/07/12 21:09:39
I meant "...may *now* go to beta with..."
adamk
2013/07/12 21:14:28
Replacing .push won't even help you; the underlyin
|
| Handle<Code> stub = |
| StoreArrayLengthStub(kind(), strict_mode).GetCode(isolate()); |
| set_target(*stub); |