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

Unified Diff: Source/core/streams/ReadableStreamImpl.h

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/ReadableStream.idl ('k') | Source/core/streams/ReadableStreamTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/streams/ReadableStreamImpl.h
diff --git a/Source/core/streams/ReadableStreamImpl.h b/Source/core/streams/ReadableStreamImpl.h
index 725801bf15cd45c0ff9d056ee83a1d121090c37d..5214d7ef3be58faea2a33105c9802ee6d611fab1 100644
--- a/Source/core/streams/ReadableStreamImpl.h
+++ b/Source/core/streams/ReadableStreamImpl.h
@@ -19,7 +19,6 @@
namespace blink {
-class ExclusiveStreamReader;
// We define the default ChunkTypeTraits for frequently used types.
template<typename ChunkType>
class ReadableStreamChunkTypeTraits { };
@@ -83,7 +82,7 @@
~ReadableStreamImpl() override { }
// ReadableStream methods
- ScriptValue readInternal(ScriptState*, ExceptionState&) override;
+ ScriptValue read(ScriptState*, ExceptionState&) override;
bool enqueue(typename ChunkTypeTraits::PassType);
@@ -91,7 +90,7 @@
// queued data. This pulls all data from this stream's queue, but
// ReadableStream public APIs can work with the behavior (i.e. it behaves
// as if multiple read-one-buffer calls were made).
- void readInternal(Deque<std::pair<typename ChunkTypeTraits::HoldType, size_t>>& queue);
+ void read(Deque<std::pair<typename ChunkTypeTraits::HoldType, size_t>>& queue);
void trace(Visitor* visitor) override
{
@@ -129,33 +128,33 @@
}
template <typename ChunkTypeTraits>
-ScriptValue ReadableStreamImpl<ChunkTypeTraits>::readInternal(ScriptState* scriptState, ExceptionState& exceptionState)
+ScriptValue ReadableStreamImpl<ChunkTypeTraits>::read(ScriptState* scriptState, ExceptionState& exceptionState)
{
- readInternalPreliminaryCheck(exceptionState);
+ readPreliminaryCheck(exceptionState);
if (exceptionState.hadException())
return ScriptValue();
- ASSERT(stateInternal() == Readable);
+ ASSERT(state() == Readable);
ASSERT(!m_queue.isEmpty());
auto pair = m_queue.takeFirst();
typename ChunkTypeTraits::HoldType chunk = pair.first;
size_t size = pair.second;
ASSERT(m_totalQueueSize >= size);
m_totalQueueSize -= size;
- readInternalPostAction();
+ readPostAction();
return ChunkTypeTraits::toScriptValue(scriptState, chunk);
}
template <typename ChunkTypeTraits>
-void ReadableStreamImpl<ChunkTypeTraits>::readInternal(Deque<std::pair<typename ChunkTypeTraits::HoldType, size_t>>& queue)
+void ReadableStreamImpl<ChunkTypeTraits>::read(Deque<std::pair<typename ChunkTypeTraits::HoldType, size_t>>& queue)
{
// We omit the preliminary check. Check it by yourself.
- ASSERT(stateInternal() == Readable);
+ ASSERT(state() == Readable);
ASSERT(!m_queue.isEmpty());
ASSERT(queue.isEmpty());
queue.swap(m_queue);
m_totalQueueSize = 0;
- readInternalPostAction();
+ readPostAction();
}
} // namespace blink
« no previous file with comments | « Source/core/streams/ReadableStream.idl ('k') | Source/core/streams/ReadableStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698