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

Issue 42573: Prevent data read errors from crashing the browser. (Closed)

Created:
11 years, 9 months ago by Lei Zhang
Modified:
9 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Prevent data read errors from crashing the browser. In ResourceDispatcherHost::OnResponseStarted(), if Read() causes an error, it calls OnResponseCompleted(). For a download, this hits the NOTREACHED() in DownloadThrottlingResourceHandler::OnResponseCompleted(). This patch checks for the error status, and returns false, which causes the download to finish, which saves an empty file of size 0. BUG=8170 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=12410

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M chrome/browser/renderer_host/download_throttling_resource_handler.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Lei Zhang
Scott, can you take a look at this one? You originally wrote the code in ...
11 years, 9 months ago (2009-03-24 21:21:48 UTC) #1
sky
11 years, 9 months ago (2009-03-24 21:35:45 UTC) #2
LGTM, just add a comment and update the spacing.

http://codereview.chromium.org/42573/diff/1/2
File chrome/browser/renderer_host/download_throttling_resource_handler.cc
(right):

http://codereview.chromium.org/42573/diff/1/2#newcode108
Line 108: return false;
Can you add a comment here saying we can get this if the response fails right
away?

nit: spacing is off

Powered by Google App Engine
This is Rietveld 408576698