Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: src/ic.cc

Issue 19139003: Merged r15651 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index dc15194ec94432419b73f1d8c74bcad458e5c305..f10e74803926ef7c7252586af323d1455b7c49af 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1651,12 +1651,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()) {
Handle<Code> stub =
StoreArrayLengthStub(kind(), strict_mode).GetCode(isolate());
set_target(*stub);
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698