Commit 6fa5ee31 authored by Adam Rice's avatar Adam Rice Committed by Chromium LUCI CQ

Fix comments in readable_stream.h

We no longer have two implementations of ReadableStream. Fix comments accordingly.

Change-Id: Ibbcd35b19782bb402e2623ae9ac3f05548b38819
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2497966Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833275}
parent 05a54caa
...@@ -67,25 +67,23 @@ class CORE_EXPORT ReadableStream : public ScriptWrappable { ...@@ -67,25 +67,23 @@ class CORE_EXPORT ReadableStream : public ScriptWrappable {
Member<AbortSignal> signal_; Member<AbortSignal> signal_;
}; };
// Create* functions create an appropriate subclass depending on which enum State : uint8_t { kReadable, kClosed, kErrored };
// implementation is selected by blink features.
// Zero-argument form of the constructor called from JavaScript.
static ReadableStream* Create(ScriptState*, ExceptionState&); static ReadableStream* Create(ScriptState*, ExceptionState&);
// One-argument constructor called from JavaScript.
static ReadableStream* Create(ScriptState*, static ReadableStream* Create(ScriptState*,
ScriptValue underlying_source, ScriptValue underlying_source,
ExceptionState&); ExceptionState&);
enum State : uint8_t { kReadable, kClosed, kErrored };
// Implements ReadableStream::Create() when this implementation is enabled. // Two-argument constructor called from JavaScript.
static ReadableStream* Create(ScriptState* script_state, static ReadableStream* Create(ScriptState* script_state,
ScriptValue underlying_source, ScriptValue underlying_source,
ScriptValue strategy, ScriptValue strategy,
ExceptionState& exception_state); ExceptionState& exception_state);
// Implements ReadableStream::CreateWithCountQueueingStrategy() when this // Entry point to create a ReadableStream from other C++ APIs.
// implementation is enabled.
//
// TODO(ricea): Replace this API with something more efficient when the old
// implementation is gone.
static ReadableStream* CreateWithCountQueueingStrategy( static ReadableStream* CreateWithCountQueueingStrategy(
ScriptState* script_state, ScriptState* script_state,
UnderlyingSourceBase* underlying_source, UnderlyingSourceBase* underlying_source,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment