Index: content/browser/loader/navigation_url_loader_impl_core.cc |
diff --git a/content/browser/loader/navigation_url_loader_impl_core.cc b/content/browser/loader/navigation_url_loader_impl_core.cc |
index f7c1dde688b6b9bfd246b8c1887c8c52a392cf4c..05d4b654efd8f0b9d601f2f2bff8f8ecd2ec39bc 100644 |
--- a/content/browser/loader/navigation_url_loader_impl_core.cc |
+++ b/content/browser/loader/navigation_url_loader_impl_core.cc |
@@ -47,8 +47,11 @@ void NavigationURLLoaderImplCore::Start( |
base::Bind(&NavigationURLLoaderImpl::NotifyRequestStarted, loader_, |
base::TimeTicks::Now())); |
- ResourceDispatcherHostImpl::Get()->BeginNavigationRequest( |
- resource_context, *request_info, this, service_worker_handle_core); |
+ // The ResourceDispatcherHostImpl can be null in unit tests. |
+ if (ResourceDispatcherHostImpl::Get()) { |
nasko
2015/12/03 15:10:27
Interesting. If we hit this in real code (for some
clamy
2015/12/03 16:15:02
Mm not sure. It's not a change from the current si
|
+ ResourceDispatcherHostImpl::Get()->BeginNavigationRequest( |
+ resource_context, *request_info, this, service_worker_handle_core); |
+ } |
} |
void NavigationURLLoaderImplCore::FollowRedirect() { |