Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: components/ntp_tiles/icon_cacher_impl.cc

Issue 2737873002: Avoid dependency on unspecified evaluation order of parameters. (Closed)
Patch Set: Update comment. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/icon_cacher_impl.cc
diff --git a/components/ntp_tiles/icon_cacher_impl.cc b/components/ntp_tiles/icon_cacher_impl.cc
index 6c7076f85fa247e0e62d5fcdc0aae87f769412db..c0ed25259248f29d7214e2ba1291d2623be48925 100644
--- a/components/ntp_tiles/icon_cacher_impl.cc
+++ b/components/ntp_tiles/icon_cacher_impl.cc
@@ -49,8 +49,11 @@ void IconCacherImpl::StartFetch(
PopularSites::Site site,
const base::Closure& icon_available,
const base::Closure& preliminary_icon_available) {
+ // Copy values from |site| before it is moved.
+ GURL site_url = site.url;
+ favicon_base::IconType icon_type = IconType(site);
favicon::GetFaviconImageForPageURL(
- favicon_service_, site.url, IconType(site),
+ favicon_service_, site_url, icon_type,
base::Bind(&IconCacherImpl::OnGetFaviconImageForPageURLFinished,
base::Unretained(this), std::move(site), icon_available,
preliminary_icon_available),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698