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

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

Issue 1228063004: Fix keyed element access wrt string wrappers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.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 2015 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 () {
6 var o = new String("ab");
7 function store(o, i, v) { o[i] = v; }
8 function load(o, i) { return o[i]; }
9
10 // Initialize the IC.
11 store(o, 2, 10);
12 load(o, 2);
13
14 store(o, 0, 100);
15 assertEquals("a", load(o, 0));
16 })();
17
18 (function () {
19 var o = {__proto__: new String("ab")};
20 function store(o, i, v) { o[i] = v; }
21 function load(o, i) { return o[i]; }
22
23 // Initialize the IC.
24 store(o, 2, 10);
25 load(o, 2);
26
27 store(o, 0, 100);
28 assertEquals("a", load(o, 0));
29 })();
30
31 (function () {
32 "use strict";
33 var o = {__proto__: {}};
34 function store(o, i, v) { o[i] = v; }
35
36 // Initialize the IC.
37 store(o, 0, 100);
38 o.__proto__.__proto__ = new String("bla");
39 assertThrows(function () { store(o, 1, 100) });
40 })();
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698