Commit 9fe1bd70 authored by horo's avatar horo Committed by Commit bot

Don't call OnRegistrationDeleted when the unregistration failed.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#322555}
parent 4ff34e7f
...@@ -356,7 +356,7 @@ void ServiceWorkerContextCore::UnregistrationComplete( ...@@ -356,7 +356,7 @@ void ServiceWorkerContextCore::UnregistrationComplete(
int64 registration_id, int64 registration_id,
ServiceWorkerStatusCode status) { ServiceWorkerStatusCode status) {
callback.Run(status); callback.Run(status);
if (observer_list_.get()) { if (status == SERVICE_WORKER_OK && observer_list_.get()) {
observer_list_->Notify(FROM_HERE, observer_list_->Notify(FROM_HERE,
&ServiceWorkerContextObserver::OnRegistrationDeleted, &ServiceWorkerContextObserver::OnRegistrationDeleted,
registration_id, pattern); registration_id, pattern);
......
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