Commit 8649def9 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //chrome/browser/printing/

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

Bug: 1122844
Change-Id: I0c067c8b927baae4ce5c81dde91bbd1d45df635b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382813
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802881}
parent 5f4d6dad
...@@ -62,7 +62,8 @@ void PrintQueriesQueue::Shutdown() { ...@@ -62,7 +62,8 @@ void PrintQueriesQueue::Shutdown() {
// corresponding PrintJob, so any pending preview requests are not covered // corresponding PrintJob, so any pending preview requests are not covered
// by PrintJobManager::StopJobs and should be stopped explicitly. // by PrintJobManager::StopJobs and should be stopped explicitly.
for (auto& query : queries_to_stop) { for (auto& query : queries_to_stop) {
query->PostTask( PrinterQuery* const query_ptr = query.get();
query_ptr->PostTask(
FROM_HERE, base::BindOnce(&PrinterQuery::StopWorker, std::move(query))); FROM_HERE, base::BindOnce(&PrinterQuery::StopWorker, std::move(query)));
} }
} }
......
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