Fixing gtk2 bustage. Don't even bother using a QI when we just want to get at an interface from a concrete class pointer.

This commit is contained in:
bryner%brianryner.com 2003-07-26 07:59:23 +00:00
Родитель 7f432959d0
Коммит 2415a1bd5c
1 изменённых файлов: 3 добавлений и 8 удалений

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

@ -681,12 +681,10 @@ nsAppRootAccessible::AddRootAccessible(nsRootAccessibleWrap *aRootAccWrap)
NS_ENSURE_ARG_POINTER(aRootAccWrap);
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIAccessibleDocument> docAcc =
do_QueryInterface(aRootAccWrap, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// add by weak reference
rv = mChildren->AppendElement(docAcc, PR_TRUE);
rv = mChildren->AppendElement(NS_STATIC_CAST(nsIAccessibleDocument*, aRootAccWrap),
PR_TRUE);
#ifdef MAI_LOGGING
PRUint32 count = 0;
@ -710,13 +708,10 @@ nsAppRootAccessible::RemoveRootAccessible(nsRootAccessibleWrap *aRootAccWrap)
PRUint32 index = 0;
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIAccessibleDocument> docAcc =
do_QueryInterface(aRootAccWrap, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// we must use weak ref to get the index
nsCOMPtr<nsIWeakReference> weakPtr =
do_GetWeakReference(docAcc);
do_GetWeakReference(NS_STATIC_CAST(nsIAccessibleDocument*, aRootAccWrap));
rv = mChildren->IndexOf(0, weakPtr, &index);
#ifdef MAI_LOGGING