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

Issue 1902963003: [Streams] UnderlyingSourceBase should be kept alive only when locked (Closed)

Created:
4 years, 8 months ago by yhirano
Modified:
4 years, 8 months ago
CC:
domenic, blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@add-stream-operations
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Streams] UnderlyingSourceBase should be kept alive only when locked In a situation that UnderlyingSourceBase lives in Blink and the associated stream is exposed to the script, we're relying on ActiveScriptWrappable mechanism to keep the underlying source alive even when it is unreachable from the script, because it is very difficult to handle the following script with other means. let stream = ...; let reader = stream.getReader(); let promise = reader.read(); reader = null; stream = null; // Now the script doesn't have a reference to the underlying source but we // need to keep it alive until the promise resolves or rejects. On the other hand, current UnderlyingSourceBase::hasPendingActivity returns true when the associated controller is active and it's too leaky. For example, fetch('/big-resource-with-cache-control-no-store'); leaks because no one read the body and the controller will stay active. This CL introduces notifyLockAcquired and notifyLockReleased to UnderlyingSourceBase to notify the locking status and make UnderlyingSourceBase::hasPendingActivity use the information. BUG=596832 Committed: https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd Cr-Commit-Position: refs/heads/master@{#389038}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Messages

Total messages: 19 (11 generated)
yhirano
4 years, 8 months ago (2016-04-20 03:40:07 UTC) #4
domenic
Thanks very much for tracking this down. LGTM with a nit. https://codereview.chromium.org/1902963003/diff/20001/third_party/WebKit/Source/core/streams/ReadableStream.js File third_party/WebKit/Source/core/streams/ReadableStream.js (right): ...
4 years, 8 months ago (2016-04-20 20:38:04 UTC) #7
yhirano
https://codereview.chromium.org/1902963003/diff/20001/third_party/WebKit/Source/core/streams/ReadableStream.js File third_party/WebKit/Source/core/streams/ReadableStream.js (right): https://codereview.chromium.org/1902963003/diff/20001/third_party/WebKit/Source/core/streams/ReadableStream.js#newcode284 third_party/WebKit/Source/core/streams/ReadableStream.js:284: CallOrNoop( On 2016/04/20 20:38:04, domenic wrote: > Should be ...
4 years, 8 months ago (2016-04-21 01:50:50 UTC) #8
tyoshino (SeeGerritForStatus)
lgtm
4 years, 8 months ago (2016-04-21 05:54:15 UTC) #9
commit-bot: I haz the power
This CL has an open dependency (Issue 1899163002 Patch 20001). Please resolve the dependency and ...
4 years, 8 months ago (2016-04-21 05:58:27 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1902963003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1902963003/40001
4 years, 8 months ago (2016-04-22 04:13:20 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-22 06:16:29 UTC) #17
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:44:45 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd
Cr-Commit-Position: refs/heads/master@{#389038}

Powered by Google App Engine
This is Rietveld 408576698