this should bring down the leaks

should have used XPCom
This commit is contained in:
rods%netscape.com 2000-05-08 21:39:29 +00:00
Родитель 3258cd4851
Коммит 39619de583
2 изменённых файлов: 8 добавлений и 16 удалений

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

@ -316,15 +316,11 @@ nsComboboxControlFrame::Init(nsIPresContext* aPresContext,
// Start - Temporary fix for Bug 36558 // Start - Temporary fix for Bug 36558
//------------------------------- //-------------------------------
mGoodToGo = PR_FALSE; mGoodToGo = PR_FALSE;
nsIDocument * document; nsCOMPtr<nsIDocument> document;
nsresult rv = aContent->GetDocument(document); nsresult rv = aContent->GetDocument(*getter_AddRefs(document));
if (NS_SUCCEEDED(rv) && document) { if (NS_SUCCEEDED(rv) && document) {
nsIXULDocument * xulDoc; nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(document));
if (NS_SUCCEEDED(document->QueryInterface(NS_GET_IID(nsIXULDocument), (void**)&xulDoc))) { mGoodToGo = xulDoc?PR_FALSE:PR_TRUE;
mGoodToGo = PR_FALSE;
} else {
mGoodToGo = PR_TRUE;
}
} }
//------------------------------- //-------------------------------
// Done - Temporary fix for Bug 36558 // Done - Temporary fix for Bug 36558

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

@ -316,15 +316,11 @@ nsComboboxControlFrame::Init(nsIPresContext* aPresContext,
// Start - Temporary fix for Bug 36558 // Start - Temporary fix for Bug 36558
//------------------------------- //-------------------------------
mGoodToGo = PR_FALSE; mGoodToGo = PR_FALSE;
nsIDocument * document; nsCOMPtr<nsIDocument> document;
nsresult rv = aContent->GetDocument(document); nsresult rv = aContent->GetDocument(*getter_AddRefs(document));
if (NS_SUCCEEDED(rv) && document) { if (NS_SUCCEEDED(rv) && document) {
nsIXULDocument * xulDoc; nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(document));
if (NS_SUCCEEDED(document->QueryInterface(NS_GET_IID(nsIXULDocument), (void**)&xulDoc))) { mGoodToGo = xulDoc?PR_FALSE:PR_TRUE;
mGoodToGo = PR_FALSE;
} else {
mGoodToGo = PR_TRUE;
}
} }
//------------------------------- //-------------------------------
// Done - Temporary fix for Bug 36558 // Done - Temporary fix for Bug 36558