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

Unified Diff: Source/modules/fetch/Body.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/xmlhttprequest/XMLHttpRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/Body.cpp
diff --git a/Source/modules/fetch/Body.cpp b/Source/modules/fetch/Body.cpp
index b90a6ca9c0452344f034f2e65f0a02c6656e8c4c..3d2b1cdfb4a0722f35a48d56d4693ca4a4035e87 100644
--- a/Source/modules/fetch/Body.cpp
+++ b/Source/modules/fetch/Body.cpp
@@ -113,8 +113,8 @@
}
// Take back the data in |m_stream|.
Deque<std::pair<RefPtr<DOMArrayBuffer>, size_t>> tmp_queue;
- if (m_stream->stateInternal() == ReadableStream::Readable)
- m_stream->readInternal(tmp_queue);
+ if (m_stream->state() == ReadableStream::Readable)
+ m_stream->read(tmp_queue);
*dataLost = m_queueCount != tmp_queue.size();
while (!tmp_queue.isEmpty()) {
std::pair<RefPtr<DOMArrayBuffer>, size_t> data = tmp_queue.takeFirst();
@@ -379,7 +379,7 @@
{
if (m_resolver)
return true;
- if (m_stream && m_stream->hasPendingActivity())
+ if (m_stream && (m_stream->state() == ReadableStream::Readable || m_stream->state() == ReadableStream::Waiting))
return true;
return false;
}
« no previous file with comments | « Source/core/xmlhttprequest/XMLHttpRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698