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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2352533003: [Autofill] Migrate ChromePasswordManagerClient<-->PasswordGenerationAgent IPCs to mojo. (Closed)
Patch Set: Rebase only Created 4 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
« no previous file with comments | « content/public/common/associated_interface_provider.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 096178bc478602062e296a870d92c7a362397750..29bee41952f4bea82c4307ff14f21a5d5d5b655b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2476,13 +2476,19 @@ AssociatedInterfaceProvider*
RenderFrameImpl::GetRemoteAssociatedInterfaces() {
if (!remote_associated_interfaces_) {
ChildThreadImpl* thread = ChildThreadImpl::current();
- mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces;
- thread->GetRemoteRouteProvider()->GetRoute(
- routing_id_,
- mojo::GetProxy(&remote_interfaces,
- thread->channel()->GetAssociatedGroup()));
- remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl(
- std::move(remote_interfaces)));
+ if (thread) {
+ mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces;
+ thread->GetRemoteRouteProvider()->GetRoute(
+ routing_id_, mojo::GetProxy(&remote_interfaces,
+ thread->channel()->GetAssociatedGroup()));
+ remote_associated_interfaces_.reset(
+ new AssociatedInterfaceProviderImpl(std::move(remote_interfaces)));
+ } else {
+ // In some tests the thread may be null,
+ // so set up a self-contained interface provider instead.
+ remote_associated_interfaces_.reset(
+ new AssociatedInterfaceProviderImpl());
+ }
}
return remote_associated_interfaces_.get();
}
« no previous file with comments | « content/public/common/associated_interface_provider.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698