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

Unified Diff: services/ui/surfaces/display_compositor.cc

Issue 2612873003: Fix bug removing temporary surface references. (Closed)
Patch Set: Created 3 years, 11 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 | services/ui/surfaces/display_compositor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index 80faca0ebb5369623c70dfb342871e39b7c6f830..35c92cd31db5df72c58eea5c23a44c971aeff84a 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -169,13 +169,13 @@ void DisplayCompositor::AddSurfaceReference(const cc::SurfaceReference& ref) {
}
// Remove markers for temporary references up to |child_id|, as the temporary
- // references they correspond to were removed above. If |ref_iter| is the last
- // element in |refs| then we are removing all temporary references for the
- // FrameSinkId and can remove the map entry entirely.
+ // references they correspond to were removed above. If |temp_ref_iter| points
+ // at the last element in |refs| then we are removing all temporary references
+ // for the FrameSinkId and can remove the map entry entirely.
if (++temp_ref_iter == refs.end())
temp_references_.erase(child_id.frame_sink_id());
else
- refs.erase(refs.begin(), ++temp_ref_iter);
+ refs.erase(refs.begin(), temp_ref_iter);
}
void DisplayCompositor::RemoveSurfaceReference(
« no previous file with comments | « no previous file | services/ui/surfaces/display_compositor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698