Commit 6240437d authored by Saman Sami's avatar Saman Sami Committed by Commit Bot

Add DCHECK to RWHVAndroid::DestroyDelegatedContent

I removed a DCHECK by mistake in crrev.com/c/995915. Also add a
comment.

Bug: 815187
Change-Id: I5bffc2b23358a56ebf3a35621c6c9f2970519b58
Reviewed-on: https://chromium-review.googlesource.com/1005785Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549690}
parent b0327eee
...@@ -977,6 +977,9 @@ void RenderWidgetHostViewAndroid::DestroyDelegatedContent() { ...@@ -977,6 +977,9 @@ void RenderWidgetHostViewAndroid::DestroyDelegatedContent() {
if (!delegated_frame_host_) if (!delegated_frame_host_)
return; return;
DCHECK(delegated_frame_host_->HasDelegatedContent() ==
frame_evictor_->HasFrame());
delegated_frame_host_->DestroyDelegatedContent(); delegated_frame_host_->DestroyDelegatedContent();
if (frame_evictor_->HasFrame()) if (frame_evictor_->HasFrame())
......
...@@ -160,6 +160,8 @@ bool DelegatedFrameHostAndroid::CanCopyFromCompositingSurface() const { ...@@ -160,6 +160,8 @@ bool DelegatedFrameHostAndroid::CanCopyFromCompositingSurface() const {
} }
void DelegatedFrameHostAndroid::DestroyDelegatedContent() { void DelegatedFrameHostAndroid::DestroyDelegatedContent() {
// TakeFallbackContentFrom() can populate |content_layer_| when
// |surface_info_| is invalid.
if (content_layer_) { if (content_layer_) {
content_layer_->RemoveFromParent(); content_layer_->RemoveFromParent();
content_layer_ = nullptr; content_layer_ = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment