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

Unified Diff: components/html_viewer/web_layer_tree_view_impl.cc

Issue 1247803006: Fixes possible use after free in WebLayerTreeViewImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/html_viewer/web_layer_tree_view_impl.cc
diff --git a/components/html_viewer/web_layer_tree_view_impl.cc b/components/html_viewer/web_layer_tree_view_impl.cc
index 486e803abd55f8541e5f22356026943e799fc74f..cbc4664d7f5c518f7ad68e97d0de42cdeb8c85f7 100644
--- a/components/html_viewer/web_layer_tree_view_impl.cc
+++ b/components/html_viewer/web_layer_tree_view_impl.cc
@@ -72,6 +72,9 @@ WebLayerTreeViewImpl::WebLayerTreeViewImpl(
}
WebLayerTreeViewImpl::~WebLayerTreeViewImpl() {
+ // Destroy the LayerTreeHost before anything else as doing so ensures we're
+ // not accessed on the compositor thread (we are the LayerTreeHostClient).
+ layer_tree_host_.reset();
}
void WebLayerTreeViewImpl::WillBeginMainFrame() {
« 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