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) { |