tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

trap-is-not-callable.js (458B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget
      5 description: >
      6    Throws if trap is not callable.
      7 features: [Proxy]
      8 ---*/
      9 
     10 function Target() {}
     11 var p = new Proxy(Target, {
     12  construct: {}
     13 });
     14 
     15 assert.throws(TypeError, function() {
     16  new p();
     17 });
     18 
     19 reportCompare(0, 0);