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

Side by Side Diff: test/mjsunit/regress/regress-5669.js

Issue 2610343002: Fix: KeyedStoreGeneric must check for writable array length (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« src/ic/keyed-store-generic.cc ('K') | « src/ic/keyed-store-generic.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 function f(a, i, v) { a[i] = v; }
6 f("make it generic", 0, 0);
7
8 var a = new Array();
9 Object.defineProperty(a, "length", {value: 3, writable: false});
10 print(JSON.stringify(Object.getOwnPropertyDescriptor(a, "length")));
11 assertEquals(3, a.length);
12 f(a, 3, 3);
13 assertFalse(Object.getOwnPropertyDescriptor(a, "length").writable);
14 assertEquals(3, a.length);
15
16 var b = new Array();
17 b.length = 3;
18 Object.freeze(b);
19 assertEquals(3, b.length);
20 f(b, 3, 3);
21 assertEquals(3, b.length);
OLDNEW
« src/ic/keyed-store-generic.cc ('K') | « src/ic/keyed-store-generic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698