tor-browser

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

ctx-ctor-throws.js (438B)


      1 // Copyright (C) 2024 Jordan Harband. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: >
      6    `Promise.try` invoked on a constructor value that throws an error
      7 features: [promise-try]
      8 ---*/
      9 
     10 var CustomPromise = function () {
     11  throw new Test262Error();
     12 };
     13 
     14 assert.throws(Test262Error, function () {
     15  Promise.try.call(CustomPromise, function () {});
     16 });
     17 
     18 reportCompare(0, 0);