Commit 339ec545 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //chrome/services/machine_learning/public/cpp/test_support/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: Ib8f4ae6bb906363dbbab8ed1157a78b3e6a0e4bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383015Reviewed-by: default avatarSophie Chang <sophiechang@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802903}
parent 0f7b9164
......@@ -27,6 +27,7 @@ FakeServiceConnection::~FakeServiceConnection() {
void FakeServiceConnection::ScheduleCall(base::OnceClosure callback) {
if (!is_async_) {
std::move(callback).Run();
return;
}
pending_calls_.emplace_back(std::move(callback));
......
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