commit | cad2f64683b9af41d6af837b1cbb1f77a9c23118 | [log] [tgz] |
---|---|---|
author | Istiaque Ahmed <lazyboy@chromium.org> | Fri Jul 12 03:58:04 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 12 03:58:04 2019 |
tree | 9a78f6e84d3d5e28b67fbd3c081d9cef0c49b93e | |
parent | 0279c762b5554ff44788bf46507a9a079eaf4e88 [diff] |
Add ability to observe FileDataPipeProducer's unexpected shutdown. Call FileDataPipeProducer::Observer::OnBytesRead before calling OnDoneReading if there is an error. This allows observers to detect errors like read failures that occur when FileDataPipeProducer shuts down before it completes. With network service, extensions could see FileDataPipeProducer::Observer::OnDoneReading without any read error through OnBytesRead when FileDataPipeProducer is shut down (in the middle?). This happens when an extension has (large sized) file requests in flight and the extension is disabled/enabled rapidly. To make it possible that extensions system knows about the error, this CL adds a bool status to OnDoneReading. Without this CL, ContentVerifyJob incorrectly thinks that the content read is successful with truncated content of the file as it sees some OnBytesRead without any errors and then it sees OnDoneReading. This leads to (incorrect) content verification failure that disables the extension. This CL checks for the status of OnBytesRead and ignores content verification if an error was seen due to unexpected file read errors. This CL adds a regression test for this. Bug: 977805 Test: See bug description for repro steps. Change-Id: I72b1922d325797623fb6bd201b64de699e6c4d10 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1684506 Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Ken Rockot <rockot@google.com> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org> Cr-Commit-Position: refs/heads/master@{#676736}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .