| Index: content/browser/service_worker/embedded_worker_instance.cc
|
| diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
|
| index 840b84c6e74bd09a6aace30202685b8b25083099..0089bf5663e079bb527bcafe669851072a9741bb 100644
|
| --- a/content/browser/service_worker/embedded_worker_instance.cc
|
| +++ b/content/browser/service_worker/embedded_worker_instance.cc
|
| @@ -80,8 +80,8 @@ void SetupMojoOnUIThread(
|
| mojo::InterfaceRequest<mojo::ServiceProvider> services,
|
| mojo::InterfacePtrInfo<mojo::ServiceProvider> exposed_services) {
|
| RenderProcessHost* rph = RenderProcessHost::FromID(process_id);
|
| - // |rph| may be NULL in unit tests.
|
| - if (!rph)
|
| + // |rph| or its ServiceRegistry may be NULL in unit tests.
|
| + if (!rph || !rph->GetServiceRegistry())
|
| return;
|
| EmbeddedWorkerSetupPtr setup;
|
| rph->GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&setup));
|
|
|