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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2100353002: cc: DCHECK that the OutputSurface was released in ~LayerTreeHostImpl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: released-outputsurface: rebase Created 4 years, 6 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
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 53020f0522d00a13ce9c9cc55e55929cfe1c0380..37883d0e62d1ed7c62696e94f1db1607d14da387 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -274,6 +274,9 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
TRACE_EVENT_OBJECT_DELETED_WITH_ID(
TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_);
+ // It is released before shutdown.
+ DCHECK(!output_surface_);
+
if (input_handler_client_) {
input_handler_client_->WillShutdown();
input_handler_client_ = NULL;
@@ -299,11 +302,6 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
CleanUpTileManagerAndUIResources();
renderer_ = nullptr;
resource_provider_ = nullptr;
-
- if (output_surface_) {
- output_surface_->DetachFromClient();
- output_surface_ = nullptr;
- }
}
void LayerTreeHostImpl::BeginMainFrameAborted(CommitEarlyOutReason reason) {

Powered by Google App Engine
This is Rietveld 408576698