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

Side by Side Diff: test/mjsunit/harmony/proxies-has.js

Issue 1530873002: [proxies] Fix bogus cast in HasOwnPropertyImplementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/runtime/runtime-object.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
1 // Copyright 2015 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-proxies 5 // Flags: --harmony-proxies
6 6
7 var target = { 7 var target = {
8 "target_one": 1 8 "target_one": 1
9 }; 9 };
10 target.__proto__ = { 10 target.__proto__ = {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 result = false; 47 result = false;
48 assertThrows("'nonconf' in proxy", TypeError); 48 assertThrows("'nonconf' in proxy", TypeError);
49 49
50 // Step 9b iii. Trap result must confirm presence of all own properties of 50 // Step 9b iii. Trap result must confirm presence of all own properties of
51 // non-extensible targets. 51 // non-extensible targets.
52 Object.preventExtensions(target); 52 Object.preventExtensions(target);
53 assertThrows("'nonconf' in proxy", TypeError); 53 assertThrows("'nonconf' in proxy", TypeError);
54 assertThrows("'target_one' in proxy", TypeError); 54 assertThrows("'target_one' in proxy", TypeError);
55 assertFalse("target_two" in proxy); 55 assertFalse("target_two" in proxy);
56 assertFalse("in_your_dreams" in proxy); 56 assertFalse("in_your_dreams" in proxy);
57
58 // Regression test for crbug.com/570120 (stray JSObject::cast).
59 (function TestHasPropertyFastPath() {
60 var proxy = new Proxy({}, {});
61 var object = Object.create(proxy);
62 object.hasOwnProperty(0);
63 })();
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698