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

Issue 2245053002: Fix UB with LayerTreeImpl::PassSwapPromises usage (Closed)

Created:
4 years, 4 months ago by svartmetal
Modified:
4 years, 4 months ago
Reviewers:
brianderson, enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix UB with LayerTreeImpl::PassSwapPromises usage C++ reference says: "Unless otherwise specified, all standard library objects that have been moved from are placed in a valid but unspecified state" (http://en.cppreference.com/w/cpp/utility/move). According to this, current CL fixes UB related to |LayerTreeHost::swap_promise_list_| and |LayerTreeImpl::swap_promise_list_| incorrect usage. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/fea15b7520e0ef137d5794e03ad30bc033228b7d Cr-Commit-Position: refs/heads/master@{#412495}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use std::vector::clear instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M cc/trees/layer_tree_host.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
svartmetal
4 years, 4 months ago (2016-08-15 12:04:29 UTC) #3
enne (OOO)
lgtm
4 years, 4 months ago (2016-08-15 17:02:17 UTC) #6
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/2245053002/1
4 years, 4 months ago (2016-08-15 17:02:32 UTC) #7
brianderson
https://codereview.chromium.org/2245053002/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (left): https://codereview.chromium.org/2245053002/diff/1/cc/trees/layer_tree_host.cc#oldcode514 cc/trees/layer_tree_host.cc:514: sync_tree->PassSwapPromises(std::move(swap_promise_list_)); Thanks for catching this! It would be more ...
4 years, 4 months ago (2016-08-15 17:05:55 UTC) #8
svartmetal
https://codereview.chromium.org/2245053002/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (left): https://codereview.chromium.org/2245053002/diff/1/cc/trees/layer_tree_host.cc#oldcode514 cc/trees/layer_tree_host.cc:514: sync_tree->PassSwapPromises(std::move(swap_promise_list_)); On 2016/08/15 17:05:55, brianderson wrote: > Thanks for ...
4 years, 4 months ago (2016-08-15 19:04:33 UTC) #10
svartmetal
brianderson@, please take another look.
4 years, 4 months ago (2016-08-16 09:38:42 UTC) #11
svartmetal
brianderson@, please take another look.
4 years, 4 months ago (2016-08-16 19:33:22 UTC) #12
brianderson
lgtm
4 years, 4 months ago (2016-08-16 21:42:43 UTC) #13
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/2245053002/20001
4 years, 4 months ago (2016-08-17 09:54:20 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-17 11:10:27 UTC) #17
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 11:11:38 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fea15b7520e0ef137d5794e03ad30bc033228b7d
Cr-Commit-Position: refs/heads/master@{#412495}

Powered by Google App Engine
This is Rietveld 408576698