Bug 745494 - Hide the anonymous editing UI before its too late; r=roc a=blocking

This commit is contained in:
Ehsan Akhgari 2012-04-18 20:10:49 -04:00
Родитель f28b30844b
Коммит 2bd8c30ca7
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -136,10 +136,6 @@ nsHTMLEditor::~nsHTMLEditor()
// we ignore the error.
nsCOMPtr<nsIEditActionListener> mListener = do_QueryInterface(mRules);
RemoveEditActionListener(mListener);
// Clean up after our anonymous content -- we don't want these nodes to
// stay around (which they would, since the frames have an owning reference).
HideAnonymousEditingUIs();
//the autopointers will clear themselves up.
//but we need to also remove the listeners or we have a leak
@ -345,6 +341,10 @@ nsHTMLEditor::PreDestroy(bool aDestroyingFrames)
RemoveOverrideStyleSheet(mStyleSheetURLs[0]);
}
// Clean up after our anonymous content -- we don't want these nodes to
// stay around (which they would, since the frames have an owning reference).
HideAnonymousEditingUIs();
return nsPlaintextEditor::PreDestroy(aDestroyingFrames);
}