| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index 6fba0086fafb042e8b701137e7d0f786e313bdb7..506fdb0bcf8f02242c4c585cd1090235927a4586 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -2448,13 +2448,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();
|
| }
|
|
|