Skip to content

Commit

Permalink
ui_devtools: Fix crash when closing while inspecting UI
Browse files Browse the repository at this point in the history
A DCHECK in ~EventHandler() of OverlayAgentAura checks if the event
handler is removed from its target. Call RemovePreTargetHandler()
in ~OverlayAgentAura() so that this condition is met when closing
the browser window.

Bug: 1163950
Change-Id: Ia8096f057af3bbfc54bc45ccde538dfdb09bf895
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633691
Reviewed-by: Wei Li <weili@chromium.org>
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844296}
  • Loading branch information
naeioi authored and Chromium LUCI CQ committed Jan 16, 2021
1 parent fd955d0 commit 0d66783
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/ui_devtools/views/overlay_agent_aura.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ OverlayAgentAura::OverlayAgentAura(DOMAgent* dom_agent)
}

OverlayAgentAura::~OverlayAgentAura() {
RemovePreTargetHandler();
overlay_agent_aura_ = nullptr;
}

Expand Down

0 comments on commit 0d66783

Please sign in to comment.