Commit 90f799c8 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //c/b/webshare/

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

Bug: 1122844
Change-Id: I79a2c036a0f674dbedc48094b7b7ceee5d3893c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560633
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831297}
parent ec14872e
......@@ -177,7 +177,8 @@ void ShareServiceImpl::Share(const std::string& title,
#elif defined(OS_WIN)
auto share_operation = std::make_unique<webshare::ShareOperation>(
title, text, share_url, std::move(files), web_contents);
share_operation->Run(base::BindOnce(
auto* const share_operation_ptr = share_operation.get();
share_operation_ptr->Run(base::BindOnce(
[](std::unique_ptr<webshare::ShareOperation> share_operation,
ShareCallback callback,
blink::mojom::ShareError result) { std::move(callback).Run(result); },
......
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