Index: content/browser/service_worker/service_worker_dispatcher_host.cc |
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc |
index b105177362fbcb2cdc4518d473ae8b5e7695af24..a5b344bc87eac2d0c5ac84d792aadabe422d3c51 100644 |
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
@@ -1552,6 +1552,8 @@ void ServiceWorkerDispatcherHost::DidUpdateNavigationPreloadEnabled( |
std::string(kDatabaseErrorMessage))); |
return; |
} |
+ if (!GetContext()) |
+ return; |
ServiceWorkerRegistration* registration = |
GetContext()->GetLiveRegistration(registration_id); |
if (registration) |
@@ -1572,6 +1574,8 @@ void ServiceWorkerDispatcherHost::DidUpdateNavigationPreloadHeader( |
std::string(kDatabaseErrorMessage))); |
return; |
} |
+ if (!GetContext()) |
+ return; |
ServiceWorkerRegistration* registration = |
GetContext()->GetLiveRegistration(registration_id); |
if (registration) |