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

Unified Diff: content/browser/service_worker/embedded_worker_instance.cc

Issue 1406823002: Start of foreign fetch implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unit test Created 5 years, 2 months 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
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 5efdd30f358f41b7c9781cc6a234ebad86994196..78ecddaccbfb759c5c22547cb085b022f11612e0 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));

Powered by Google App Engine
This is Rietveld 408576698