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

Side by Side Diff: test/mjsunit/element-accessor.js

Issue 1238533003: Use the LookupIterator to transition to elements accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disallow defining accessors on typed arrays 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/objects.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 = [];
7 o.__proto__ = {};
8
9 function store(o, i, v) {
10 o[i] = v;
11 }
12
13 store(o, 0, 0);
14 store(o, 1, 0);
15 store(o, 2, 0);
16 o.__proto__[10000000] = 1;
17
18 var set = 0;
19
20 Object.defineProperty(o, "3", {
21 get:function() { return 100; },
22 set:function(v) { set = v; }});
23
24 store(o, 3, 1000);
25 assertEquals(1000, set);
26 assertEquals(100, o[3]);
27 })();
28
29 (function () {
30 var o = new Int32Array();
31 Object.defineProperty(o, "0", {get: function(){}});
32 assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0"));
33 })();
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698