Fix incorrect usage of |nsCOMPtr<T>::operator&| was used in place of |getter_AddRefs| since the former will soon become |private| to prevent things like this. r=disttsc@bart.nl b=59414

This commit is contained in:
dbaron%fas.harvard.edu 2001-02-04 19:37:36 +00:00
Родитель 24cad542ad
Коммит 550314e09f
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -755,7 +755,8 @@ NS_IMETHODIMP nsWebBrowser::Create()
// registration can go away, and nsDocShellTreeOwner can stop implementing
// nsIWebProgressListener.
nsCOMPtr<nsISupports> supports = nsnull;
(void)mDocShellTreeOwner->QueryInterface(NS_GET_IID(nsIWebProgressListener), (void**)&supports);
(void)mDocShellTreeOwner->QueryInterface(NS_GET_IID(nsIWebProgressListener),
NS_STATIC_CAST(void**, getter_AddRefs(supports)));
(void)BindListener(supports, NS_GET_IID(nsIWebProgressListener));
NS_ENSURE_SUCCESS(mDocShellAsWin->InitWindow(nsnull,

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

@ -70,9 +70,8 @@ nsUrlWidget::SetURLToHiddenControl( char const *aURL, nsIDOMWindowInternal *pare
{
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIBaseWindow> ppBaseWindow;
ppDocShell->QueryInterface(NS_GET_IID(nsIBaseWindow), (void **)&ppBaseWindow);
if (ppBaseWindow != NULL)
nsCOMPtr<nsIBaseWindow> ppBaseWindow(do_QueryInterface(ppDocShell));
if (ppBaseWindow)
{
nsCOMPtr<nsIWidget> ppWidget;
ppBaseWindow->GetMainWidget(getter_AddRefs(ppWidget));