Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Unified Diff: content/browser/loader/navigation_url_loader_impl_core.cc

Issue 1498663003: PlzNavigate: fix crash in unit_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698