Commit 620392a8 authored by horo's avatar horo Committed by Commit bot

[ServiceWorker] Handle ServiceWorker script fetch error code correctly. [chromium]

LayoutTest is here: https://codereview.chromium.org/663723002

BUG=424464
TEST=http/tests/serviceworker/registration.html

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

Cr-Commit-Position: refs/heads/master@{#300079}
parent afc200bd
......@@ -352,11 +352,8 @@ void ServiceWorkerRegisterJob::OnStartWorkerFinished(
case net::ERR_ABORTED:
status = SERVICE_WORKER_ERROR_ABORT;
break;
case net::ERR_FAILED:
status = SERVICE_WORKER_ERROR_NETWORK;
break;
default:
NOTREACHED();
status = SERVICE_WORKER_ERROR_NETWORK;
}
}
Complete(status);
......
......@@ -128,8 +128,7 @@ bool ServiceWorkerWriteToCacheJob::ReadRawData(
// No more data to process, the job is complete.
io_buffer_ = NULL;
version_->script_cache_map()->NotifyFinishedCaching(
url_, net::URLRequestStatus());
version_->script_cache_map()->NotifyFinishedCaching(url_, status);
did_notify_finished_ = true;
return status.is_success();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment