ui_devtools: Sends node remove request to frontend only it exists in DOM
DOMAgent’s OnUIElementRemoved() DCHECKs if the UIElement to be removed exists. Yet, elements of a bubble are currently being removed twice, breaking this DCHECK. The first removal is in WidgetElement::OnWidgetDestroyed(). The second is in WidgetDelegate::DeleteDelegate(), where eventually ViewElement::OnChildViewRemoved() is called. Because the whole DOM tree is removed in the first call, the DCHECK fails in the second call. This change removes the above DCHECK and sends the removal request only when the node exists in the DOM. Bug: 1167240 Change-Id: Ia6fc327a8fc5004dce7333f232b323f7b677fbfe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2639134 Commit-Queue: Keren Zhu <kerenzhu@chromium.org> Reviewed-by:Wei Li <weili@chromium.org> Cr-Commit-Position: refs/heads/master@{#845799}
Showing
Please register or sign in to comment