DescriptionIntroduce StreamRegistry::RegisterReaderAbortedStream()
If the reader of the stream is aborted before the stream is registered,
StreamRegistry::RegisterStream() should fail to reduce the memory consumption.
So this change introduces StreamRegistry::RegisterReaderAbortedStream().
We will use this method in this situation:
- The request from the page is sent to the ServiceWorker.
- The ServiceWorker creates a Stream and starts uploading the data to the browser process with it.
- The browser process receives the stream URL in ServiceWorkerHostMsg_FetchEventFinished.
But it didn't receive StreamHostMsg_StartBuilding yet.
- The page stops the loading the resource.
-> Call this method in the browser process.
- The browser receives StreamHostMsg_StartBuilding and creates a Stream and registers it to the StreamRegistry.
-> This registration should fail.
BUG=436424
TEST=content_unittests --gtest_filter=StreamTest.*
Committed: https://crrev.com/5f0c294795345faa7a77de46f5e6ed31a6bb2ee3
Cr-Commit-Position: refs/heads/master@{#308025}
Patch Set 1 #
Total comments: 2
Patch Set 2 : nullptr #Patch Set 3 : RegisterReaderAbortedStream #Patch Set 4 : AbortPendingStream #
Messages
Total messages: 22 (3 generated)
|