@@ -32,12 +32,14 @@ exports.convert = function convert(value, { context = \\"The provided value\\" }
32
32
then(onFulfilled, onRejected) {
33
33
return Promise.prototype.then.call(
34
34
this,
35
+
35
36
value => {
36
37
value = conversions[\\"any\\"](value, { context: context + \\" promise value\\" });
37
38
if (typeof onFulfilled === \\"function\\") {
38
39
return onFulfilled(value);
39
40
}
40
41
},
42
+
41
43
reason => {
42
44
reason = conversions[\\"any\\"](reason, { context: context + \\" promise value\\" });
43
45
if (typeof onRejected === \\"function\\") {
@@ -3708,6 +3710,28 @@ exports.install = (globalObject, globalNames) => {
3708
3710
{
3709
3711
let curArg = arguments[0];
3710
3712
curArg = new Promise(resolve => resolve(curArg));
3713
+ Object.assign(curArg, {
3714
+ then(onFulfilled, onRejected) {
3715
+ return Promise.prototype.then.call(
3716
+ this,
3717
+
3718
+ () => {
3719
+ if (typeof onFulfilled === \\"function\\") {
3720
+ return onFulfilled();
3721
+ }
3722
+ },
3723
+
3724
+ reason => {
3725
+ reason = conversions[\\"any\\"](reason, {
3726
+ context: \\"Failed to execute 'voidPromiseConsumer' on 'PromiseTypes': parameter 1\\" + \\" promise value\\"
3727
+ });
3728
+ if (typeof onRejected === \\"function\\") {
3729
+ return onRejected(reason);
3730
+ }
3731
+ }
3732
+ );
3733
+ }
3734
+ });
3711
3735
args.push(curArg);
3712
3736
}
3713
3737
return esValue[implSymbol].voidPromiseConsumer(...args);
@@ -3734,6 +3758,7 @@ exports.install = (globalObject, globalNames) => {
3734
3758
then(onFulfilled, onRejected) {
3735
3759
return Promise.prototype.then.call(
3736
3760
this,
3761
+
3737
3762
value => {
3738
3763
value = conversions[\\"double\\"](value, {
3739
3764
context: \\"Failed to execute 'promiseConsumer' on 'PromiseTypes': parameter 1\\" + \\" promise value\\"
@@ -3742,6 +3767,7 @@ exports.install = (globalObject, globalNames) => {
3742
3767
return onFulfilled(value);
3743
3768
}
3744
3769
},
3770
+
3745
3771
reason => {
3746
3772
reason = conversions[\\"any\\"](reason, {
3747
3773
context: \\"Failed to execute 'promiseConsumer' on 'PromiseTypes': parameter 1\\" + \\" promise value\\"
@@ -8913,12 +8939,14 @@ exports.convert = function convert(value, { context = \\"The provided value\\" }
8913
8939
then(onFulfilled, onRejected) {
8914
8940
return Promise.prototype.then.call(
8915
8941
this,
8942
+
8916
8943
value => {
8917
8944
value = conversions[\\"any\\"](value, { context: context + \\" promise value\\" });
8918
8945
if (typeof onFulfilled === \\"function\\") {
8919
8946
return onFulfilled(value);
8920
8947
}
8921
8948
},
8949
+
8922
8950
reason => {
8923
8951
reason = conversions[\\"any\\"](reason, { context: context + \\" promise value\\" });
8924
8952
if (typeof onRejected === \\"function\\") {
@@ -12547,6 +12575,28 @@ exports.install = (globalObject, globalNames) => {
12547
12575
{
12548
12576
let curArg = arguments[0];
12549
12577
curArg = new Promise(resolve => resolve(curArg));
12578
+ Object.assign(curArg, {
12579
+ then(onFulfilled, onRejected) {
12580
+ return Promise.prototype.then.call(
12581
+ this,
12582
+
12583
+ () => {
12584
+ if (typeof onFulfilled === \\"function\\") {
12585
+ return onFulfilled();
12586
+ }
12587
+ },
12588
+
12589
+ reason => {
12590
+ reason = conversions[\\"any\\"](reason, {
12591
+ context: \\"Failed to execute 'voidPromiseConsumer' on 'PromiseTypes': parameter 1\\" + \\" promise value\\"
12592
+ });
12593
+ if (typeof onRejected === \\"function\\") {
12594
+ return onRejected(reason);
12595
+ }
12596
+ }
12597
+ );
12598
+ }
12599
+ });
12550
12600
args.push(curArg);
12551
12601
}
12552
12602
return esValue[implSymbol].voidPromiseConsumer(...args);
@@ -12573,6 +12623,7 @@ exports.install = (globalObject, globalNames) => {
12573
12623
then(onFulfilled, onRejected) {
12574
12624
return Promise.prototype.then.call(
12575
12625
this,
12626
+
12576
12627
value => {
12577
12628
value = conversions[\\"double\\"](value, {
12578
12629
context: \\"Failed to execute 'promiseConsumer' on 'PromiseTypes': parameter 1\\" + \\" promise value\\"
@@ -12581,6 +12632,7 @@ exports.install = (globalObject, globalNames) => {
12581
12632
return onFulfilled(value);
12582
12633
}
12583
12634
},
12635
+
12584
12636
reason => {
12585
12637
reason = conversions[\\"any\\"](reason, {
12586
12638
context: \\"Failed to execute 'promiseConsumer' on 'PromiseTypes': parameter 1\\" + \\" promise value\\"
0 commit comments