Commit 30c6bd2e authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

[Extensions Toolbar] Ensure popup is closed at shutdown

Since the popup close process is asynchronous, it's possible that the popup
doesn't close by the time the platform delegate is deleted. If that's the
case, we need to be sure to close it, so that we do our cleanup (like
removing ourselves as an observer).

BUG=454361

Review URL: https://codereview.chromium.org/878813003

Cr-Commit-Position: refs/heads/master@{#314352}
parent 6be45c8c
......@@ -69,6 +69,10 @@ ExtensionActionPlatformDelegateViews::~ExtensionActionPlatformDelegateViews() {
DCHECK(!popup_); // We should never have a visible popup at shutdown.
if (context_menu_owner == this)
context_menu_owner = nullptr;
// Since the popup close process is asynchronous, it might not be fully closed
// at shutdown. We still need to cleanup, though.
if (popup_)
CleanupPopup(true);
UnregisterCommand(false);
}
......
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