Commit 4bf05b95 authored by Willie Koomson's avatar Willie Koomson Committed by Commit Bot

arc: Only call StopVm() if ARCVM is running

This change adds a check in ArcVmClientAdapter::StopArcInstance() to see
if a VM is running (current_cid_ is set). If not, skip calling
ConciergeClient::StopVm() and notify observers that ARCVM is stopped
right away.

BUG=b:169893632
TEST=arc.AuthPerf.unmanaged_vm

Change-Id: Ic927f122cacea0e89cacffbbcd67a217772dba43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462573
Commit-Queue: Willie Koomson <wvk@google.com>
Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816221}
parent 3f68a02c
...@@ -547,6 +547,13 @@ class ArcVmClientAdapter : public ArcClientAdapter, ...@@ -547,6 +547,13 @@ class ArcVmClientAdapter : public ArcClientAdapter,
<< "StopArcInstance is called during browser shutdown. Do nothing."; << "StopArcInstance is called during browser shutdown. Do nothing.";
return; return;
} }
if (current_cid_ == kInvalidCid) {
// No VM is currently running, avoid calling ConciergeClient::StopVm().
// TODO(wvk): Once StartMiniArc() is implemented, use a DCHECK here
// instead.
OnArcInstanceStopped();
return;
}
if (should_backup_log) { if (should_backup_log) {
GetDebugDaemonClient()->BackupArcBugReport( GetDebugDaemonClient()->BackupArcBugReport(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment