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 ba448b7e4737bc7ce45659ad446d2682900a907f..0e7f4287c9bc325ac861e3218985e226eeb1b78e 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) { |