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

Side by Side Diff: test/mjsunit/es6/instanceof-proxies.js

Issue 1815773002: Remove runtime flags for Proxy and Reflect (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 9 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 | « test/mjsunit/es6/debug-stepin-proxies.js ('k') | test/mjsunit/es6/iteration-semantics.js » ('j') | 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 5
6 // Flags: --harmony-proxies --allow-natives-syntax 6 // Flags: --allow-natives-syntax
7 7
8 // Test instanceof with proxies. 8 // Test instanceof with proxies.
9 9
10 (function TestInstanceOfWithProxies() { 10 (function TestInstanceOfWithProxies() {
11 function foo(x) { 11 function foo(x) {
12 return x instanceof Array; 12 return x instanceof Array;
13 } 13 }
14 assertTrue(foo([])); 14 assertTrue(foo([]));
15 assertFalse(foo({})); 15 assertFalse(foo({}));
16 %OptimizeFunctionOnNextCall(foo); 16 %OptimizeFunctionOnNextCall(foo);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 (function testInstanceOfWithRecursiveProxy() { 53 (function testInstanceOfWithRecursiveProxy() {
54 // Make sure we gracefully deal with recursive proxies. 54 // Make sure we gracefully deal with recursive proxies.
55 var proxy = new Proxy({},{}); 55 var proxy = new Proxy({},{});
56 proxy.__proto__ = proxy; 56 proxy.__proto__ = proxy;
57 // instanceof will cause an inifinite prototype walk. 57 // instanceof will cause an inifinite prototype walk.
58 assertThrows(() => { proxy instanceof Object }, RangeError); 58 assertThrows(() => { proxy instanceof Object }, RangeError);
59 59
60 var proxy2 = new Proxy({}, {getPrototypeOf() { return proxy2 }}); 60 var proxy2 = new Proxy({}, {getPrototypeOf() { return proxy2 }});
61 assertThrows(() => { proxy instanceof Object }, RangeError); 61 assertThrows(() => { proxy instanceof Object }, RangeError);
62 })(); 62 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/debug-stepin-proxies.js ('k') | test/mjsunit/es6/iteration-semantics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698