OLD | NEW |
(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 (function testConcatRevokedProxyToArray() { |
| 6 "use strict"; |
| 7 var handler = { |
| 8 get(_, name) { |
| 9 if (name === Symbol.isConcatSpreadable) { |
| 10 p.revoke(); |
| 11 } |
| 12 return target[name]; |
| 13 } |
| 14 } |
| 15 |
| 16 var target = []; |
| 17 var p = Proxy.revocable(target, handler); |
| 18 assertThrows(function() { [].concat(p.proxy); }, TypeError); |
| 19 })(); |
OLD | NEW |