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

Issue 2737873002: Avoid dependency on unspecified evaluation order of parameters. (Closed)

Created:
3 years, 9 months ago by sdefresne
Modified:
3 years, 9 months ago
Reviewers:
sfiera
CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid dependency on unspecified evaluation order of parameters. According to the standard, "the order of evaluation of arguments is unspecified. All side effects of argument expression evaluations take effect before the function is entered." This mean that |site| may be moved before |site.url| or |IconType| are evaluated, thus having them access a moved object (returning unspecified values). BUG=None Review-Url: https://codereview.chromium.org/2737873002 Cr-Commit-Position: refs/heads/master@{#455515} Committed: https://chromium.googlesource.com/chromium/src/+/2bc5b5fb3da0c205a025535faff4fb160ca6467a

Patch Set 1 #

Total comments: 2

Patch Set 2 : Update comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M components/ntp_tiles/icon_cacher_impl.cc View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 14 (9 generated)
sdefresne
I saw this while investigating an issue (unrelated) but though it would be good to ...
3 years, 9 months ago (2017-03-08 02:51:15 UTC) #4
sfiera
LGTM https://codereview.chromium.org/2737873002/diff/1/components/ntp_tiles/icon_cacher_impl.cc File components/ntp_tiles/icon_cacher_impl.cc (right): https://codereview.chromium.org/2737873002/diff/1/components/ntp_tiles/icon_cacher_impl.cc#newcode55 components/ntp_tiles/icon_cacher_impl.cc:55: // it is moved. I think "copy values ...
3 years, 9 months ago (2017-03-08 09:38:54 UTC) #7
sdefresne
Thank you. https://codereview.chromium.org/2737873002/diff/1/components/ntp_tiles/icon_cacher_impl.cc File components/ntp_tiles/icon_cacher_impl.cc (right): https://codereview.chromium.org/2737873002/diff/1/components/ntp_tiles/icon_cacher_impl.cc#newcode55 components/ntp_tiles/icon_cacher_impl.cc:55: // it is moved. On 2017/03/08 09:38:54, ...
3 years, 9 months ago (2017-03-08 18:35:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2737873002/20001
3 years, 9 months ago (2017-03-08 18:36:00 UTC) #11
commit-bot: I haz the power
3 years, 9 months ago (2017-03-08 19:37:48 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/2bc5b5fb3da0c205a025535faff4...

Powered by Google App Engine
This is Rietveld 408576698