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

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

Issue 1902963003: [Streams] UnderlyingSourceBase should be kept alive only when locked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-stream-operations
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/ReadableStreamOperationsTest.cpp » ('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 414c92343120fd65d3d7f87f4c38c6ffede89c77..bb8204fca08e51ca93c1e6925ba9911ff9c2d329 100644
--- a/third_party/WebKit/Source/core/streams/ReadableStream.js
+++ b/third_party/WebKit/Source/core/streams/ReadableStream.js
@@ -276,6 +276,17 @@
throw new TypeError(errReaderConstructorStreamAlreadyLocked);
}
+ // TODO(yhirano): Remove this when we don't need hasPendingActivity in
+ // blink::UnderlyingSourceBase.
+ if (stream[readableStreamController] === null) {
+ // The stream is created with an external controller (i.e. made in
+ // Blink).
+ CallOrNoop(
domenic 2016/04/20 20:38:04 Should be `const underlyingSource = stream[readabl
yhirano 2016/04/21 01:50:50 Done.
+ stream[readableStreamUnderlyingSource],
+ 'notifyLockAcquired',
+ 'underlyingSource.notifyLockAcquired');
+ }
+
this[readableStreamReaderOwnerReadableStream] = stream;
stream[readableStreamReader] = this;
@@ -342,6 +353,17 @@
throw new TypeError(errReleaseReaderWithPendingRead);
}
+ // TODO(yhirano): Remove this when we don't need hasPendingActivity in
+ // blink::UnderlyingSourceBase.
+ if (stream[readableStreamController] === null) {
+ // The stream is created with an external controller (i.e. made in
+ // Blink).
+ CallOrNoop(
+ stream[readableStreamUnderlyingSource],
+ 'notifyLockReleased',
+ 'underlyingSource.notifyLockReleased');
+ }
+
if (stream[readableStreamState] === STATE_READABLE) {
v8.rejectPromise(this[readableStreamReaderClosedPromise],
new TypeError(errReleasedReaderClosedPromise));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698