Issue #1442 - Part 19 - FetchStream must support multiple read requests. https://bugzilla.mozilla.org/show_bug.cgi?id=1395220

This commit is contained in:
Brian Smith 2023-09-29 09:12:08 -05:00 committed by roytam1
commit 0e1efcb273

View file

@ -185,7 +185,13 @@ FetchStream::RequestDataCallback(JSContext* aCx,
RefPtr<FetchStream> stream = static_cast<FetchStream*>(aUnderlyingSource);
MOZ_DIAGNOSTIC_ASSERT(stream->mState == eWaiting ||
stream->mState == eChecking);
stream->mState == eChecking ||
stream->mState == eReading);
if (stream->mState == eReading) {
// We are already reading data.
return;
}
if (stream->mState == eChecking) {
// If we are looking for more data, there is nothing else we should do: