Index: content/browser/service_worker/service_worker_context_wrapper.cc |
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc |
index 7d20899a9decb634ea2dcd10ea442f4fabeecbb6..8df6f4297a8cf06b966b6ef26caca543ecf9b0a0 100644 |
--- a/content/browser/service_worker/service_worker_context_wrapper.cc |
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc |
@@ -143,6 +143,13 @@ void ServiceWorkerContextWrapper::Shutdown() { |
void ServiceWorkerContextWrapper::DeleteAndStartOver() { |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
+ if (!context_core_) { |
+ // The context could be null due to system shutdown or restart failure. In |
+ // either case, we should not have to recover the system, so just return |
+ // here. |
+ LOG(ERROR) << "ServiceWorkerContextCore is no longer alive."; |
+ return; |
+ } |
context_core_->DeleteAndStartOver( |
base::Bind(&ServiceWorkerContextWrapper::DidDeleteAndStartOver, this)); |
} |