зеркало из https://github.com/mozilla/gecko-dev.git
Fix crash when we do a ReconstructDocElementHierarchy on a XUL document, which destroys the nsDocElementBoxFrame (which constructs the popupset) but not the nsRootBoxFrame. b=156719 r=waterson sr=ben a=asa
This commit is contained in:
Родитель
e3b908170b
Коммит
725f1e7cab
|
@ -289,9 +289,12 @@ nsRootBoxFrame::GetPopupSetFrame(nsIFrame** aResult)
|
|||
NS_IMETHODIMP
|
||||
nsRootBoxFrame::SetPopupSetFrame(nsIFrame* aPopupSet)
|
||||
{
|
||||
NS_ASSERTION(!mPopupSetFrame, "Popup set is already defined! Only 1 allowed.");
|
||||
if (!mPopupSetFrame)
|
||||
mPopupSetFrame = aPopupSet;
|
||||
// Under normal conditions this should only be called once. However,
|
||||
// if something triggers ReconstructDocElementHierarchy, we will
|
||||
// destroy this frame's child (the nsDocElementBoxFrame), but not this
|
||||
// frame. Since the anonymous content is associated with the
|
||||
// nsDocElementBoxFrame, we'll get a new popupset.
|
||||
mPopupSetFrame = aPopupSet;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче