tor-browser

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

ctx-non-ctor.js (551B)


      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 /*---
      5 description: >
      6    `Promise.all` invoked on a non-constructor value
      7 es6id: 25.4.4.1
      8 info: |
      9    [...]
     10    6. Let promiseCapability be NewPromiseCapability(C).
     11    7. ReturnIfAbrupt(promiseCapability).
     12 
     13    25.4.1.5 NewPromiseCapability ( C )
     14 
     15    1. If IsConstructor(C) is false, throw a TypeError exception.
     16 ---*/
     17 
     18 assert.throws(TypeError, function() {
     19  Promise.all.call(eval);
     20 });
     21 
     22 reportCompare(0, 0);