summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layout/xul/nsMenuFrame.cpp4
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;
}