fix 370967 - crash when focusing the input of an <isindex> and then reloading the document

(move the (mInputContent)->RemoveEventListenerByIID call from the destructor to Destroy() so that it actually gets called.)
r+sr=roc
This commit is contained in:
asqueella%gmail.com 2007-02-20 20:25:14 +00:00
Родитель b9a18a5be9
Коммит adbef41e83
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -91,18 +91,18 @@ nsIsIndexFrame::nsIsIndexFrame(nsStyleContext* aContext) :
nsIsIndexFrame::~nsIsIndexFrame()
{
// remove ourself as a listener of the text control (bug 40533)
if (mInputContent) {
nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryInterface(mInputContent));
receiver->RemoveEventListenerByIID(this, NS_GET_IID(nsIDOMKeyListener));
}
}
void
nsIsIndexFrame::Destroy()
{
// remove ourself as a listener of the text control (bug 40533)
if (mInputContent) {
nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryInterface(mInputContent));
receiver->RemoveEventListenerByIID(this, NS_GET_IID(nsIDOMKeyListener));
nsContentUtils::DestroyAnonymousContent(&mInputContent);
}
nsContentUtils::DestroyAnonymousContent(&mTextContent);
nsContentUtils::DestroyAnonymousContent(&mInputContent);
nsContentUtils::DestroyAnonymousContent(&mPreHr);
nsContentUtils::DestroyAnonymousContent(&mPostHr);
nsAreaFrame::Destroy();