- From: Kagami Sascha Rosylight <notifications@github.com>
- Date: Wed, 18 Oct 2023 01:39:26 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 18 October 2023 08:39:31 UTC
Hmm, logging transformerDict.cancel at https://github.com/whatwg/streams/blob/007d729f1476f7f1ea34731ba9bd2becb702117e/reference-implementation/lib/abstract-ops/transform-streams.js#L143 shows this:
```js
function invokeTheCallbackFunction(reason) {
const thisArg = utils.tryWrapperForImpl(this);
let callResult;
try {
callResult = Reflect.apply(value, thisArg, [reason]);
callResult = new Promise(resolve => resolve(callResult));
return callResult;
} catch (err) {
return Promise.reject(err);
}
}
```
And the returned promise is unresolved, which means listening on this promise takes an extra round. That's webidl2js layer, not sure why it's implemented like this, I should check the spec and also try updating webidl2js to v17.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1296#issuecomment-1767966425
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/streams/issues/1296/1767966425@github.com>
Received on Wednesday, 18 October 2023 08:39:31 UTC