Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/race/species-get-error.js

raw
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.race() does not retrieve `Symbol.species` property of the `this` value
7 es6id: 25.4.4.3
8 info: |
9 1. Let C be the this value.
10 2. If Type(C) is not Object, throw a TypeError exception.
11 3. Let promiseCapability be ? NewPromiseCapability(C).
12 ...
13 features: [Symbol.species]
14 ---*/
15
16 function C(executor) {
17 executor(function() {}, function() {});
18 }
19 Object.defineProperty(C, Symbol.species, {
20 get: function() {
21 $ERROR("Getter for Symbol.species called");
22 }
23 });
24
25 Promise.race.call(C, []);