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

Unified Diff: third_party/WebKit/Source/core/streams/ReadableStream.js

Issue 1898873003: Add ReadableStream operations to use it from Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@body-stream-buffer-test-refactoring
Patch Set: Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/core/streams/ReadableStreamOperations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/streams/ReadableStream.js
diff --git a/third_party/WebKit/Source/core/streams/ReadableStream.js b/third_party/WebKit/Source/core/streams/ReadableStream.js
index 62522533c4b53b72374074307140a6d3230b6f9f..414c92343120fd65d3d7f87f4c38c6ffede89c77 100644
--- a/third_party/WebKit/Source/core/streams/ReadableStream.js
+++ b/third_party/WebKit/Source/core/streams/ReadableStream.js
@@ -487,6 +487,10 @@
return stream[readableStreamBits] & DISTURBED;
}
+ function SetReadableStreamDisturbed(stream) {
+ return stream[readableStreamBits] |= DISTURBED;
+ }
+
function IsReadableStreamLocked(stream) {
return stream[readableStreamReader] !== undefined;
}
@@ -495,6 +499,18 @@
return hasOwnProperty(x, readableStreamControllerControlledReadableStream);
}
+ function IsReadableStreamReadable(stream) {
+ return stream[readableStreamState] === STATE_READABLE;
+ }
+
+ function IsReadableStreamClosed(stream) {
+ return stream[readableStreamState] === STATE_CLOSED;
+ }
+
+ function IsReadableStreamErrored(stream) {
+ return stream[readableStreamState] === STATE_ERRORED;
+ }
+
function IsReadableStreamReader(x) {
return hasOwnProperty(x, readableStreamReaderOwnerReadableStream);
}
@@ -784,7 +800,11 @@
binding.AcquireReadableStreamReader = AcquireReadableStreamReader;
binding.IsReadableStream = IsReadableStream;
binding.IsReadableStreamDisturbed = IsReadableStreamDisturbed;
+ binding.SetReadableStreamDisturbed = SetReadableStreamDisturbed;
binding.IsReadableStreamLocked = IsReadableStreamLocked;
+ binding.IsReadableStreamReadable = IsReadableStreamReadable;
+ binding.IsReadableStreamClosed = IsReadableStreamClosed;
+ binding.IsReadableStreamErrored = IsReadableStreamErrored;
binding.IsReadableStreamReader = IsReadableStreamReader;
binding.ReadFromReadableStreamReader = ReadFromReadableStreamReader;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/streams/ReadableStreamOperations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698