Index: content/renderer/renderer_blink_platform_impl.cc |
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc |
index 64910a75f2ca02f7bb19d9c81ef9fb76a911ced5..9c2bf4a7f624b03b187881e457e278c25b0af8a2 100644 |
--- a/content/renderer/renderer_blink_platform_impl.cc |
+++ b/content/renderer/renderer_blink_platform_impl.cc |
@@ -310,12 +310,17 @@ void RendererBlinkPlatformImpl::Shutdown() { |
//------------------------------------------------------------------------------ |
blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { |
+ if (!url_loader_factory_) { |
+ serviceRegistry()->connectToRemoteService( |
+ mojo::GetProxy(&url_loader_factory_)); |
+ } |
ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
// There may be no child thread in RenderViewTests. These tests can still use |
// data URLs to bypass the ResourceDispatcher. |
return new content::WebURLLoaderImpl( |
child_thread ? child_thread->resource_dispatcher() : NULL, |
- base::WrapUnique(currentThread()->getWebTaskRunner()->clone())); |
+ base::WrapUnique(currentThread()->getWebTaskRunner()->clone()), |
+ url_loader_factory_.get()); |
} |
blink::WebThread* RendererBlinkPlatformImpl::currentThread() { |