mol_wire_lib 1.0.967 → 1.0.968
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.js +11 -9
- package/node.js.map +1 -1
- package/node.mjs +11 -9
- package/node.test.js +11 -9
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +11 -9
- package/web.js.map +1 -1
- package/web.mjs +11 -9
package/node.js
CHANGED
|
@@ -754,16 +754,13 @@ var $;
|
|
|
754
754
|
result = this.task.call(this.host, ...this.args);
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
|
-
if ($mol_promise_like(result)) {
|
|
757
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
758
758
|
const put = (res) => {
|
|
759
759
|
if (this.cache === result)
|
|
760
760
|
this.put(res);
|
|
761
761
|
return res;
|
|
762
762
|
};
|
|
763
|
-
result =
|
|
764
|
-
destructor: result['destructor'] ?? (() => { })
|
|
765
|
-
});
|
|
766
|
-
handled.add(result);
|
|
763
|
+
result = result.then(put, put);
|
|
767
764
|
}
|
|
768
765
|
}
|
|
769
766
|
catch (error) {
|
|
@@ -774,15 +771,20 @@ var $;
|
|
|
774
771
|
result = new Error(String(error), { cause: error });
|
|
775
772
|
}
|
|
776
773
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
777
|
-
result =
|
|
774
|
+
result = result.finally(() => {
|
|
778
775
|
if (this.cache === result)
|
|
779
776
|
this.absorb();
|
|
780
|
-
}), {
|
|
781
|
-
destructor: result['destructor'] ?? (() => { })
|
|
782
777
|
});
|
|
783
|
-
handled.add(result);
|
|
784
778
|
}
|
|
785
779
|
}
|
|
780
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
781
|
+
result = Object.assign(result, {
|
|
782
|
+
destructor: result['destructor'] ?? (() => { })
|
|
783
|
+
});
|
|
784
|
+
handled.add(result);
|
|
785
|
+
const error = new Error();
|
|
786
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
787
|
+
}
|
|
786
788
|
if (!$mol_promise_like(result)) {
|
|
787
789
|
this.track_cut();
|
|
788
790
|
}
|