diff options
author | Moonchild <moonchild@palemoon.org> | 2021-11-05 00:49:39 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-11-05 11:37:34 +0000 |
commit | 652171acd5ad50037b1177ec92df82d1f2a5482a (patch) | |
tree | fc78e440b484e489cd2a1892f8a24a861ba7b302 | |
parent | db335d499856f741dfd250c533fc0f811fc52ffe (diff) | |
download | uxp-RC_20211105.tar.gz |
[layout] Hold strong references to delayed menu command events.RELBASE_20211109RC_20211105
-rw-r--r-- | layout/xul/nsMenuFrame.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index 087323a875..30cab242ea 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -1273,7 +1273,9 @@ nsMenuFrame::PassMenuCommandEventToPopupManager() nsXULPopupManager* pm = nsXULPopupManager::GetInstance(); nsMenuParent* menuParent = GetMenuParent(); if (pm && menuParent && mDelayedMenuCommandEvent) { - pm->ExecuteMenu(mContent, mDelayedMenuCommandEvent); + nsCOMPtr<nsIContent> content = mContent; + RefPtr<nsXULMenuCommandEvent> event = mDelayedMenuCommandEvent; + pm->ExecuteMenu(content, event); } mDelayedMenuCommandEvent = nullptr; } |