https://wicg.github.io/serial/#writable-attribute
https://github.com/WICG/serial/pull/160
This integration prevents a situation in which aborting a SerialPort's WritableStream can be blocked waiting for a partially-written chunk of data to be written to the port. If the port is waiting for the peer device to provide a flow control signal it could be blocked indefinitely. The intent of aborting a WritableStream is to immediately stop trying to write data to the underlying sink. The introduction of an AbortSignal to the controller was done to fix bugs like this.
The Web Serial API and WritableStream controller AbortSignal have both been reviewed by the TAG.
Not applicable
This integration introduces a minor change to the behavior of a SerialPort's WritableStream because it means that it no longer waits for the current write() operation to complete. However, since the intention of abort() is to discard queued writes and the exact timing for when the current write() operation completes depends on how quickly data is being transmitted by the port, the current behavior is more appropriately classified as a bug than a feature. It would be very hard for developers to rely on the previous buggy behavior, and so we believe the compat risk to be minimal.
Gecko: No signal
Firefox is opposed to the Web Serial API in general.
WebKit: No signal
Safari is opposed to the Web Serial API in general.
Web developers: No signals
I don't believe any developers have noticed this particular quirk. I noticed because I was debugging a test of the abort() behavior that passed even though there was a write() pending and without this integration it shouldn't have. Fixing the bug in the test exposed the need for this integration.
Other signals:
SerialPort and WritableStream are JavaScript APIs which can be debugged using DevTools.
Yes
None
False
https://bugs.chromium.org/p/chromium/issues/detail?id=1295963
M-100
https://chromestatus.com/feature/4778232531386368
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAEmk%3DMYv0pu_WEXE6EAoZvVkh7W-ck_Gu5Qf52eFUuiwYhcW4A%40mail.gmail.com.
LGTM3
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/0000000000003926e505d824c540%40google.com.