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

Side by Side Diff: test/mjsunit/regress/regress-crbug-673008.js

Issue 2568943002: [stubs] Fix negative index lookup in hasOwnProperty (Closed)
Patch Set: add test Created 4 years 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/code-stub-assembler.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 2016 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 var a = {
6 "33": true,
7 "-1": true
8 };
9
10 var strkeys = Object.keys(a).map(function(k) { return "" + k });
11 var numkeys = Object.keys(a).map(function(k) { return +k });
12 var keys = strkeys.concat(numkeys);
13
14 keys.forEach(function(k) {
15 assertTrue(a.hasOwnProperty(k),
16 "property not found: " + k + "(" + (typeof k) + ")");
17 });
18
19 var b = {};
20 b.__proto__ = a;
21 keys.forEach(function(k) {
22 assertTrue(k in b, "property not found: " + k + "(" + (typeof k) + ")");
23 });
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698