Chromium Code Reviews| Index: test/mjsunit/es6/array-concat.js |
| diff --git a/test/mjsunit/es6/array-concat.js b/test/mjsunit/es6/array-concat.js |
| index 00edfd66c1c52466113f7ef649d40fe209ea9d29..f57c10e03eb8484ac45dbacecb944384fda963ed 100644 |
| --- a/test/mjsunit/es6/array-concat.js |
| +++ b/test/mjsunit/es6/array-concat.js |
| @@ -872,3 +872,25 @@ logger.get = function(t, trap, r) { |
| assertThrows(() => [].concat(obj), TypeError); |
| assertThrows(() => Array.prototype.concat.apply(obj), TypeError); |
| })(); |
| + |
| +(function testConcatRevokedProxy() { |
| + "use strict"; |
| + var target = []; |
| + var handler = { |
| + get(_, name) { |
| + if (name === Symbol.isConcatSpreadable) { |
| + p.revoke(); |
| + } |
| + return target[name]; |
| + } |
| + } |
| + |
| + p = Proxy.revocable(target, handler); |
| + target = {}; |
| + target.__proto__ = p.proxy; |
| + assertThrows(function() { [].concat({ __proto__: p.proxy }); }, TypeError); |
| + |
| + target = []; |
| + var p = Proxy.revocable(target, handler); |
| + assertThrows(function() { [].concat(p.proxy); }, TypeError); |
| +})(); |
|
Camillo Bruni
2016/07/13 13:02:14
Could you add the same test in a separate file so
|