Index: content/browser/service_worker/service_worker_provider_host.cc |
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc |
index d1e82aac54e748d217663ddfb4987b3b756821ad..c36829aa959e0490b0c4f40d31f5a873e09697af 100644 |
--- a/content/browser/service_worker/service_worker_provider_host.cc |
+++ b/content/browser/service_worker/service_worker_provider_host.cc |
@@ -341,11 +341,14 @@ ServiceWorkerProviderHost::CreateRequestHandler( |
} |
if (ServiceWorkerUtils::IsMainResourceType(resource_type) || |
controlling_version()) { |
+ // |dispatcher_host_| may be null in some unittests. |
return std::unique_ptr<ServiceWorkerRequestHandler>( |
new ServiceWorkerControlleeRequestHandler( |
context_, AsWeakPtr(), blob_storage_context, request_mode, |
credentials_mode, redirect_mode, resource_type, |
- request_context_type, frame_type, body)); |
+ request_context_type, frame_type, body, |
+ dispatcher_host_ ? dispatcher_host_->url_loader_factory_getter() |
+ : MojoURLLoaderFactoryGetter())); |
} |
return std::unique_ptr<ServiceWorkerRequestHandler>(); |
} |