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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2245053002: Fix UB with LayerTreeImpl::PassSwapPromises usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 0f0a4da885297f60b68da03d91be19dcaf6303dd..cff7fbe4744b58755f3dfbd8cf2e13e51398f100 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -425,7 +425,11 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
next_activation_forces_redraw_ = false;
}
- target_tree->PassSwapPromises(std::move(swap_promise_list_));
+ {
+ std::vector<std::unique_ptr<SwapPromise>> to_pass;
+ swap_promise_list_.swap(to_pass);
+ target_tree->PassSwapPromises(std::move(to_pass));
+ }
target_tree->set_top_controls_shrink_blink_size(
top_controls_shrink_blink_size_);
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698