Re: [whatwg/streams] Resolving promises with byte sequences results in UB (Issue #1178)

In general visibility into the internals is "bad", but only for pipeTo (and maybe tee?) is it fatal. Because we really want to ensure that user agents can optimize those behind the scenes, doing something totally different than the exact spec steps but observably equivalent.

I'm very hesitant to revert #1045 because I think it improved the spec readability and architecture significantly, and we've built a lot on top of it.

My inclination is to do the local fix to these read-all-bytes/consume-body algorithms to use callbacks instead of promises, and then over time contemplate whether we can reduce the exposure of internals (like startAlgorithm etc.) via other targeted, low-priority fixes.

But I might not be understanding the issue. In particular the OP talks about undefined behavior, but I mean, it's kind of obvious what the intention is, so I don't understand why this is a big problem for Firefox's implementation instead of just being an editorial spec issue that we need to fix up. I'm sure I'm missing something there.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1178#issuecomment-948001006

Received on Wednesday, 20 October 2021 20:13:12 UTC