Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index f1dcab31fb7bf1deff1b29dae91138238d9d70b0..38f2c380cc380a89a39f036559246aefcc799cc4 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -1140,8 +1140,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = |
new ServiceWorkerDispatcherHost( |
GetID(), message_port_message_filter_.get(), resource_context, |
- base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory, |
- weak_factory_.GetWeakPtr())); |
+ CreateURLLoaderFactoryGetter()); |
service_worker_filter->Init( |
storage_partition_impl_->GetServiceWorkerContext()); |
AddFilter(service_worker_filter.get()); |
@@ -1409,6 +1408,12 @@ mojom::Renderer* RenderProcessHostImpl::GetRendererInterface() { |
return renderer_interface_.get(); |
} |
+MojoURLLoaderFactoryGetter |
+RenderProcessHostImpl::CreateURLLoaderFactoryGetter() { |
+ return base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory, |
+ weak_factory_.GetWeakPtr()); |
horo
2016/10/31 14:50:32
WeakPtr is not thread safe.
So we should not pass
piman
2016/10/31 20:43:25
I'll wait for the update before a full review. Jus
|
+} |
+ |
mojom::RouteProvider* RenderProcessHostImpl::GetRemoteRouteProvider() { |
return remote_route_provider_.get(); |
} |