Fix crash due to orphaned editor anonymous content (bug 297926). r+sr=bzbarsky, a=bsmedberg

This commit is contained in:
bryner%brianryner.com 2005-07-13 16:45:58 +00:00
Родитель d96d3342db
Коммит c0eeb02377
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -178,6 +178,16 @@ nsHTMLEditor::~nsHTMLEditor()
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).
if (mAbsolutelyPositionedObject)
HideGrabber();
if (mInlineEditedCell)
HideInlineTableEditingUI();
if (mResizedObject)
HideResizers();
//the autopointers will clear themselves up.
//but we need to also remove the listeners or we have a leak
nsCOMPtr<nsISelection>selection;