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

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

Issue 899653002: Use ExclusiveStreamReader to lock Body. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@exclusive-reader
Patch Set: rebase 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 | « LayoutTests/http/tests/fetch/script-tests/stream-reader.js ('k') | Source/modules/fetch/Body.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/streams/ReadableStream.h
diff --git a/Source/core/streams/ReadableStream.h b/Source/core/streams/ReadableStream.h
index 42f5fbca638c22b0d9acfc0bacd0a49f6b188d4f..b322c080d356d1d035cfb44249f36e9b3292aa94 100644
--- a/Source/core/streams/ReadableStream.h
+++ b/Source/core/streams/ReadableStream.h
@@ -69,6 +69,8 @@ public:
ExclusiveStreamReader* getReader(ExceptionState&);
// Only ExclusiveStreamReader methods should call this function.
void setReader(ExclusiveStreamReader*);
+
+ bool isLocked() const { return m_reader; }
bool isLockedTo(const ExclusiveStreamReader* reader) const { return m_reader == reader; }
bool hasPendingActivity() const override;
« no previous file with comments | « LayoutTests/http/tests/fetch/script-tests/stream-reader.js ('k') | Source/modules/fetch/Body.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698