Description[ServiceWorker] Handle bytes_read=0 async result correctly in ServiceWorkerWriteToCacheJob.
The async result of net_request_->Read() in ServiceWorkerWriteToCacheJob::ReadNetData() is passed to ServiceWorkerWriteToCacheJob::OnReadCompleted().
In current code the case when bytes_read is 0 is not handled correctly.
So when bytes_read is 0 the script loading will hang.
LayoutTest is here: https://codereview.chromium.org/650193003
I hope this patch will reduce the test flakiness :)
BUG=419999
TEST=http/tests/serviceworker/chromium/load-flushed-script.html
Committed: https://crrev.com/a67ddd2ace106615b22015f34ae9117a8e44699d
Cr-Commit-Position: refs/heads/master@{#300233}
Patch Set 1 #
Total comments: 7
Patch Set 2 : incorporated michaeln's comment #
Total comments: 4
Patch Set 3 : add DCHECK and remove retrurn #Messages
Total messages: 11 (2 generated)
|