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

Unified Diff: components/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc

Issue 2357053002: Always use arc::InstanceHolder<T>::GetInstanceForMethod (Closed)
Patch Set: review Created 4 years, 3 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: components/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc
diff --git a/components/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc b/components/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc
index 8b4416d3d1f9cdad918f26c3a2042641aaedd609..8f0b7df5bdec3d6e5eb86805c50a1bf84472a014 100644
--- a/components/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc
+++ b/components/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc
@@ -34,8 +34,11 @@ ArcBootPhaseMonitorBridge::~ArcBootPhaseMonitorBridge() {
void ArcBootPhaseMonitorBridge::OnInstanceReady() {
DCHECK(thread_checker_.CalledOnValidThread());
- arc_bridge_service()->boot_phase_monitor()->instance()->Init(
- binding_.CreateInterfacePtrAndBind());
+ auto* instance =
+ arc_bridge_service()->boot_phase_monitor()->GetInstanceForMethod("Init");
+ if (!instance)
+ return;
+ instance->Init(binding_.CreateInterfacePtrAndBind());
}
void ArcBootPhaseMonitorBridge::OnInstanceClosed() {

Powered by Google App Engine
This is Rietveld 408576698