2015-06-22 23:16:17 +02:00
|
|
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
description: >
|
2015-12-02 18:07:06 +01:00
|
|
|
Promise.race() does not retrieve `Symbol.species` property of the `this` value
|
2015-06-22 23:16:17 +02:00
|
|
|
es6id: 25.4.4.3
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-06-22 23:16:17 +02:00
|
|
|
1. Let C be the this value.
|
|
|
|
2. If Type(C) is not Object, throw a TypeError exception.
|
2015-12-02 18:07:06 +01:00
|
|
|
3. Let promiseCapability be ? NewPromiseCapability(C).
|
|
|
|
...
|
2015-06-22 23:16:17 +02:00
|
|
|
features: [Symbol.species]
|
|
|
|
---*/
|
|
|
|
|
2015-12-02 18:07:06 +01:00
|
|
|
function C(executor) {
|
2018-02-15 21:11:21 +01:00
|
|
|
executor(function() {}, function() {});
|
2015-12-02 18:07:06 +01:00
|
|
|
}
|
2015-06-22 23:16:17 +02:00
|
|
|
Object.defineProperty(C, Symbol.species, {
|
2019-04-24 19:35:20 +02:00
|
|
|
get() {
|
|
|
|
throw new Test262Error("Getter for Symbol.species called");
|
2015-06-22 23:16:17 +02:00
|
|
|
}
|
|
|
|
});
|
2019-04-24 19:35:20 +02:00
|
|
|
C.resolve = function() {
|
|
|
|
throw new Test262Error();
|
|
|
|
};
|
2015-06-22 23:16:17 +02:00
|
|
|
|
2015-12-02 18:07:06 +01:00
|
|
|
Promise.race.call(C, []);
|