2015-11-24 20:12:55 +01:00
|
|
|
// Copyright (C) 2015 André Bargull. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2019-06-26 21:03:14 +02:00
|
|
|
esid: sec-promise.all-resolve-element-functions
|
2015-11-24 20:12:55 +01:00
|
|
|
description: The `name` property of Promise.all Resolve Element functions
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-11-24 20:12:55 +01:00
|
|
|
A promise resolve function is an anonymous built-in function.
|
|
|
|
|
|
|
|
17 ECMAScript Standard Built-in Objects:
|
2019-08-15 16:58:40 +02:00
|
|
|
Every built-in function object, including constructors, has a `name`
|
|
|
|
property whose value is a String. Functions that are identified as
|
|
|
|
anonymous functions use the empty string as the value of the `name`
|
|
|
|
property.
|
|
|
|
Unless otherwise specified, the `name` property of a built-in function
|
|
|
|
object has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*,
|
|
|
|
[[Configurable]]: *true* }.
|
|
|
|
includes: [propertyHelper.js]
|
2015-11-24 20:12:55 +01:00
|
|
|
---*/
|
|
|
|
|
|
|
|
var resolveElementFunction;
|
|
|
|
var thenable = {
|
|
|
|
then: function(fulfill) {
|
|
|
|
resolveElementFunction = fulfill;
|
|
|
|
}
|
|
|
|
};
|
2018-02-15 21:11:21 +01:00
|
|
|
|
2015-11-24 20:12:55 +01:00
|
|
|
function NotPromise(executor) {
|
2018-02-15 21:11:21 +01:00
|
|
|
executor(function() {}, function() {});
|
2015-11-24 20:12:55 +01:00
|
|
|
}
|
2018-02-15 21:11:21 +01:00
|
|
|
NotPromise.resolve = function(v) {
|
|
|
|
return v;
|
|
|
|
};
|
2015-11-24 20:12:55 +01:00
|
|
|
Promise.all.call(NotPromise, [thenable]);
|
|
|
|
|
2019-08-15 16:58:40 +02:00
|
|
|
verifyProperty(resolveElementFunction, "name", {
|
|
|
|
value: "", writable: false, enumerable: false, configurable: true
|
|
|
|
});
|