Service worker can be updated when the script is truncated
Previously ServiceWorkerNewScriptLoader returns kErrorExists when the main worker script was just truncated because it calls CommitCompleted() when the Mojo data pipe is closed. However, it's a problem because it doesn't tell the cache writer about the end of the body so that the cache writer isn't aware of the truncation. This CL is to trigger MaybeWriteData() at connection close for the cache writer to give a chance to run script comparison at the end of the body. Bug: 986688 Change-Id: I8a816ab1ab1a2e236c1a21c1f0950437cd1e50ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1714584Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Auto-Submit: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#680369}
Showing
Please register or sign in to comment