(trap)
| 316 | // Throwing from the construct trap. |
| 317 | |
| 318 | function TestConstructThrow(trap) { |
| 319 | var f = new Proxy(function(){}, {construct: trap}); |
| 320 | assertThrowsEquals(() => new f(11), "myexn") |
| 321 | Object.freeze(f) |
| 322 | assertThrowsEquals(() => new f(11), "myexn") |
| 323 | } |
| 324 | |
| 325 | TestConstructThrow(function() { throw "myexn" }) |
| 326 | TestConstructThrow(new Proxy(function() { throw "myexn" }, {})) |