Commit 2807e98c authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //chrome/browser/notifications/scheduler/internal/

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

Bug: 1122844
Change-Id: If18a818ef82e7b5a0256e2d385eeb6fb1db292bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382072Reviewed-by: default avatarHesen Zhang <hesen@chromium.org>
Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804101}
parent f7632b4d
...@@ -96,10 +96,10 @@ void ImpressionHistoryTrackerImpl::AddImpression( ...@@ -96,10 +96,10 @@ void ImpressionHistoryTrackerImpl::AddImpression(
Impression impression(type, guid, clock_->Now()); Impression impression(type, guid, clock_->Now());
impression.impression_mapping = impression_mapping; impression.impression_mapping = impression_mapping;
impression.custom_data = custom_data; impression.custom_data = custom_data;
impression.ignore_timeout_duration = ignore_timeout_duration;
it->second->impressions.emplace_back(std::move(impression)); it->second->impressions.emplace_back(std::move(impression));
it->second->last_shown_ts = clock_->Now(); it->second->last_shown_ts = clock_->Now();
impression_map_.emplace(guid, &it->second->impressions.back()); impression_map_.emplace(guid, &it->second->impressions.back());
impression.ignore_timeout_duration = ignore_timeout_duration;
SetNeedsUpdate(type, true /*needs_update*/); SetNeedsUpdate(type, true /*needs_update*/);
MaybeUpdateDb(type); MaybeUpdateDb(type);
} }
......
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