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 testConcatRevokedProxyToArrayInPrototype() { |
| 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 p = Proxy.revocable([], handler); |
| 17 var target = { __proto__: p.proxy }; |
| 18 assertThrows(function() { [].concat(target); }, TypeError); |
| 19 })(); |
OLD | NEW |