Skip to content

Commit

Permalink
Propagate the status in ServiceWorkerURLRequestJob::OnReadCompleted
Browse files Browse the repository at this point in the history
In current code, while reading a blob created by XMLHttpRequest, the status is set to IO_PENDING in ServiceWorkerURLRequestJob::ReadRawData.
But the status will not be updated even when complete reading.
So DCHECK(!request_->status().is_io_pending()) fails while reading the next chunk.

The status must be updated in OnReadCompleted.

BUG=382311

Review URL: https://codereview.chromium.org/315863003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275995 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
horo@chromium.org committed Jun 10, 2014
1 parent ea29101 commit efa6cb4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void ServiceWorkerURLRequestJob::OnResponseStarted(net::URLRequest* request) {

void ServiceWorkerURLRequestJob::OnReadCompleted(net::URLRequest* request,
int bytes_read) {
SetStatus(request->status());
if (!request->status().is_success()) {
NotifyDone(request->status());
return;
Expand Down

0 comments on commit efa6cb4

Please sign in to comment.