Commit c4695f73 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Chromium LUCI CQ

Fix use-after-move in //c/b/offline_pages/android/downloads/

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

Bug: 1122844
Change-Id: I5753fffa991af72c48e0ca175a794040b0637b9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562144
Commit-Queue: Peter Williamson <petewil@chromium.org>
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarPeter Williamson <petewil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831924}
parent d8f178c1
......@@ -147,7 +147,8 @@ void DownloadUIAdapterDelegate::GetShareInfoForItem(
const ContentId& id,
ShareCallback share_callback) {
auto share_helper = std::make_unique<OfflinePageShareHelper>(model_);
share_helper->GetShareInfo(
auto* const share_helper_ptr = share_helper.get();
share_helper_ptr->GetShareInfo(
id, base::BindOnce(&OnShareInfoRetrieved, std::move(share_helper),
std::move(share_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