Index: third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc |
diff --git a/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc b/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc |
index 1d052dddaf732d20cb99c6bec5acca217d3c4538..eaa953265f088c46969ecc390a62a10659fe4307 100644 |
--- a/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc |
+++ b/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc |
@@ -7,6 +7,7 @@ |
#include "platform/battery/battery_status.h" |
#include "platform/threading/BindForMojo.h" |
#include "public/platform/Platform.h" |
+#include "public/platform/ServiceRegistry.h" |
#include "wtf/Assertions.h" |
namespace blink { |
@@ -20,7 +21,11 @@ BatteryDispatcherProxy::~BatteryDispatcherProxy() {} |
void BatteryDispatcherProxy::StartListening() { |
ASSERT(!monitor_.is_bound()); |
- Platform::current()->connectToRemoteService(mojo::GetProxy(&monitor_)); |
+ if (!Platform::current()->serviceRegistry()) |
esprehn
2016/03/29 05:26:20
how do we get here with a null registry? I think t
Sam McNally
2016/03/30 00:20:53
The equivalent of a null registry here would have
|
+ return; |
+ |
+ Platform::current()->serviceRegistry()->connectToRemoteService( |
+ mojo::GetProxy(&monitor_)); |
// monitor_ can be null during testing. |
if (monitor_) |
QueryNextStatus(); |