Commit 775412d3 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //base/threading/

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

Bug: 1122844
Change-Id: Ie1df128b9c677f4b86ea138cb8087cd68285dbbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383012Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803129}
parent 404d7c75
...@@ -100,8 +100,9 @@ class PostTaskAndReplyRelay { ...@@ -100,8 +100,9 @@ class PostTaskAndReplyRelay {
// |relay| is moved into a callback. // |relay| is moved into a callback.
SequencedTaskRunner* reply_task_runner_raw = relay.reply_task_runner_.get(); SequencedTaskRunner* reply_task_runner_raw = relay.reply_task_runner_.get();
const Location from_here = relay.from_here_;
reply_task_runner_raw->PostTask( reply_task_runner_raw->PostTask(
relay.from_here_, from_here,
BindOnce(&PostTaskAndReplyRelay::RunReply, std::move(relay))); BindOnce(&PostTaskAndReplyRelay::RunReply, std::move(relay)));
} }
......
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