You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A body body is said to be done if body is null or body’s stream is closed or errored.
Closing or erroring a stream involves promises being settled, which has to happen in some realm. The obvious answer is that it happens in the realm that initiated the fetch, and so will be affected by long tasks. In which case a fetch won't be "done" until any long tasks are complete. However, the existence of synchronous XHR implies that in at least some cases these stream operations are happening in some other realm that continues to execute even when the main thread is blocked.
The text was updated successfully, but these errors were encountered:
Those test expectations match my conceptual model in that the fetch happens in a separate thread and then messages back the result to the main thread. (The usage of streams in Fetch is a bit confusing however and there are various issues around that, e.g., #661, #730.)
https://fetch.spec.whatwg.org/#concept-body-wait
I'm asking because I'm trying to work out if the expectations of this test https://github.com/web-platform-tests/wpt/blob/master/xhr/xhr-timeout-longtask.any.js are correct or not. Although that tests XHR, the question comes down to when a request is "done" (see https://xhr.spec.whatwg.org/#ref-for-timed-out-flag%E2%91%A1).
Closing or erroring a stream involves promises being settled, which has to happen in some realm. The obvious answer is that it happens in the realm that initiated the fetch, and so will be affected by long tasks. In which case a fetch won't be "done" until any long tasks are complete. However, the existence of synchronous XHR implies that in at least some cases these stream operations are happening in some other realm that continues to execute even when the main thread is blocked.
The text was updated successfully, but these errors were encountered: