Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3555)

Unified Diff: Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 901013002: Revert of Introduce ExclusiveStreamReader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/streams/ReadableStreamTest.cpp ('k') | Source/modules/fetch/Body.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 593ed137e5750c15286639446f3a1241baa2db40..da958dde17562d0f17df1f7dcf36ffb66690d442 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -160,7 +160,7 @@
enqueueToStreamFromHandle();
}
- void startStream(ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>* stream)
+ void startStream(ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer> >* stream)
{
m_stream = stream;
stream->didSourceStart();
@@ -1593,7 +1593,7 @@
ASSERT(!m_responseStream);
ASSERT(!m_responseStreamSource);
m_responseStreamSource = new ReadableStreamSource(this, handle);
- m_responseStream = new ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>(executionContext(), m_responseStreamSource);
+ m_responseStream = new ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer> >(executionContext(), m_responseStreamSource);
m_responseStreamSource->startStream(m_responseStream);
// This protection seems needed to keep |this| alive after changeState
@@ -1693,7 +1693,7 @@
if (!m_responseStream) {
ASSERT(!m_responseStreamSource);
m_responseStreamSource = new ReadableStreamSource(this, nullptr);
- m_responseStream = new ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>(executionContext(), m_responseStreamSource);
+ m_responseStream = new ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer> >(executionContext(), m_responseStreamSource);
m_responseStreamSource->startStream(m_responseStream);
}
m_responseStreamSource->didReceiveData(data, len);
@@ -1773,7 +1773,7 @@
// DocumentParserClient callbacks may be called.
if (m_loader || m_responseDocumentParser)
return true;
- if (m_responseStream && m_responseStream->hasPendingActivity())
+ if (m_responseStream && (m_responseStream->state() == ReadableStream::Readable || m_responseStream->state() == ReadableStream::Waiting))
return true;
return false;
}
« no previous file with comments | « Source/core/streams/ReadableStreamTest.cpp ('k') | Source/modules/fetch/Body.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698