tor-browser

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

WeakMap-constructor-nonnull.js (287B)


      1 // WeakMap constructor should throw when key is nonnull.
      2 
      3 load(libdir + "asserts.js");
      4 
      5 var v1 = 42;
      6 
      7 var primitive = 10;
      8 assertThrowsInstanceOf(() => new WeakMap([[primitive, v1]]), TypeError);
      9 
     10 var empty_array = [];
     11 assertThrowsInstanceOf(() => new WeakMap([empty_array]), TypeError);