Commit 0d667839 authored by Keren Zhu's avatar Keren Zhu Committed by Chromium LUCI CQ

ui_devtools: Fix crash when closing while inspecting UI

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/+/2633691Reviewed-by: default avatarWei Li <weili@chromium.org>
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844296}
parent fd955d00
......@@ -22,6 +22,7 @@ OverlayAgentAura::OverlayAgentAura(DOMAgent* dom_agent)
}
OverlayAgentAura::~OverlayAgentAura() {
RemovePreTargetHandler();
overlay_agent_aura_ = 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