bug #75504; sr=jband. simple fixes correcting where people inappropriately applied |getter_AddRefs|

This commit is contained in:
scc%mozilla.org 2001-05-03 10:09:59 +00:00
Родитель 2bbd5e07b9
Коммит 6860a0a739
15 изменённых файлов: 19 добавлений и 22 удалений

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

@ -221,7 +221,7 @@ NS_IMETHODIMP nsGenericAccessible::GetAccExtState(PRUint32 *_retval)
nsDOMAccessible::nsDOMAccessible(nsIPresShell* aShell, nsIDOMNode* aNode)
{
mPresShell = getter_AddRefs(NS_GetWeakReference(aShell));
mPresShell = do_GetWeakReference(aShell);
mNode = aNode;
}

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

@ -64,7 +64,7 @@ class nsDOMAccessible : public nsGenericAccessible
NS_IMETHOD AccRemoveSelection(void);
protected:
nsIWeakReference* mPresShell;
nsCOMPtr<nsIWeakReference> mPresShell;
nsCOMPtr<nsIDOMNode> mNode;
};

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

@ -221,7 +221,7 @@ NS_IMETHODIMP nsGenericAccessible::GetAccExtState(PRUint32 *_retval)
nsDOMAccessible::nsDOMAccessible(nsIPresShell* aShell, nsIDOMNode* aNode)
{
mPresShell = getter_AddRefs(NS_GetWeakReference(aShell));
mPresShell = do_GetWeakReference(aShell);
mNode = aNode;
}

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

@ -64,7 +64,7 @@ class nsDOMAccessible : public nsGenericAccessible
NS_IMETHOD AccRemoveSelection(void);
protected:
nsIWeakReference* mPresShell;
nsCOMPtr<nsIWeakReference> mPresShell;
nsCOMPtr<nsIDOMNode> mNode;
};

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

@ -155,7 +155,7 @@ nsXULControllers::RemoveControllerAt(PRUint32 index, nsIController **_retval)
PRBool removed = mControllers.RemoveElementAt(index);
NS_ASSERTION(removed, "Removal of controller failed");
controllerData->GetController(getter_AddRefs(_retval));
controllerData->GetController(_retval);
delete controllerData;
return NS_OK;

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

@ -4740,7 +4740,7 @@ nsDocShell::GetPromptAndStringBundle(nsIPrompt ** aPrompt,
NS_ENSURE_SUCCESS(stringBundleService->
CreateBundle(DIALOG_STRING_URI,
getter_AddRefs(aStringBundle)),
aStringBundle),
NS_ERROR_FAILURE);
return NS_OK;

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

@ -1244,7 +1244,7 @@ nsWebShell::GetControllerForCommand ( const nsAReadableString & inCommand, nsICo
nsCOMPtr<nsIFocusController> focusController;
rv = window->GetRootFocusController ( getter_AddRefs(focusController) );
if ( focusController )
rv = focusController->GetControllerForCommand ( inCommand, getter_AddRefs(outController) );
rv = focusController->GetControllerForCommand ( inCommand, outController );
} // if window
return rv;

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

@ -2881,7 +2881,7 @@ GlobalWindowImpl::GetRootFocusController(nsIFocusController** aController)
if (chromeHandler) {
nsCOMPtr<nsPIWindowRoot> windowRoot(do_QueryInterface(chromeHandler));
if (windowRoot) {
windowRoot->GetFocusController(getter_AddRefs(aController));
windowRoot->GetFocusController(aController);
}
}
}

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

@ -726,7 +726,7 @@ nsAbSync::OpenAB(char *aAbName, nsIAddrDatabase **aDatabase)
NS_WITH_SERVICE(nsIAddrDatabase, addrDBFactory, kAddressBookDBCID, &rv);
if (NS_SUCCEEDED(rv) && addrDBFactory)
rv = addrDBFactory->Open(dbPath, PR_TRUE, getter_AddRefs(aDatabase), PR_TRUE);
rv = addrDBFactory->Open(dbPath, PR_TRUE, aDatabase, PR_TRUE);
}
else
rv = NS_ERROR_FAILURE;

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

@ -629,8 +629,7 @@ NS_IMETHODIMP nsAbMDBDirectory::AddMailList(nsIAbDirectory *list)
{
nsAbMDBDirProperty* dblistproperty = new nsAbMDBDirProperty ();
NS_ADDREF(dblistproperty);
nsCOMPtr<nsIAbDirectory> newlist;
newlist = getter_AddRefs(dblistproperty);
nsCOMPtr<nsIAbDirectory> newlist = getter_AddRefs(NS_STATIC_CAST(nsIAbDirectory*, dblistproperty));
newlist->CopyMailList(list);
list = newlist;
dblist = do_QueryInterface(list);
@ -675,8 +674,7 @@ NS_IMETHODIMP nsAbMDBDirectory::AddCard(nsIAbCard* card, nsIAbCard **_retval)
{
nsAbMDBCardProperty* dbcardproperty = new nsAbMDBCardProperty ();
NS_ADDREF(dbcardproperty);
nsCOMPtr<nsIAbCard> newcard;
newcard = getter_AddRefs(dbcardproperty);
nsCOMPtr<nsIAbCard> newcard = getter_AddRefs(NS_STATIC_CAST(nsIAbCard*, dbcardproperty));
newcard->Copy (card);
card = newcard;
dbcard = do_QueryInterface(card);
@ -735,8 +733,7 @@ NS_IMETHODIMP nsAbMDBDirectory::DropCard(nsIAbCard* card, nsIAbCard **_retval)
{
nsAbMDBCardProperty* dbcardproperty = new nsAbMDBCardProperty ();
NS_ADDREF(dbcardproperty);
nsCOMPtr<nsIAbCard> newcard;
newcard = getter_AddRefs (dbcardproperty);
nsCOMPtr<nsIAbCard> newcard = getter_AddRefs (NS_STATIC_CAST(nsIAbCard*, dbcardproperty));
newcard->Copy (card);
card = newcard;
dbcard = do_QueryInterface (card);

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

@ -261,7 +261,7 @@ nsAddbookProtocolHandler::OpenAB(char *aAbName, nsIAddrDatabase **aDatabase)
NS_WITH_SERVICE(nsIAddrDatabase, addrDBFactory, kAddressBookDBCID, &rv);
if (NS_SUCCEEDED(rv) && addrDBFactory)
rv = addrDBFactory->Open(dbPath, PR_TRUE, getter_AddRefs(aDatabase), PR_TRUE);
rv = addrDBFactory->Open(dbPath, PR_TRUE, aDatabase, PR_TRUE);
delete dbPath;
}

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

@ -589,7 +589,7 @@ NS_AsyncWriteFromStream(nsIRequest **aRequest,
aOffset,
aCount,
aFlags,
getter_AddRefs(aRequest));
aRequest);
}
//
@ -619,7 +619,7 @@ NS_AsyncReadToStream(nsIRequest **aRequest,
aOffset,
aCount,
aFlags,
getter_AddRefs(aRequest));
aRequest);
}
#endif // nsNetUtil_h__

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

@ -176,7 +176,7 @@ nsSHistory::GetEntryAtIndex(PRInt32 aIndex, PRBool aModifyIndex, nsISHEntry** aR
rv = GetTransactionAtIndex(aIndex, getter_AddRefs(txn));
if (NS_SUCCEEDED(rv) && txn) {
//Get the Entry from the transaction
rv = txn->GetSHEntry(getter_AddRefs(aResult));
rv = txn->GetSHEntry(aResult);
if (NS_SUCCEEDED(rv) && (*aResult)) {
// Set mIndex to the requested index, if asked to do so..
if (aModifyIndex) {

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

@ -2660,7 +2660,7 @@ nsInstall::ExtractFileFromJar(const nsString& aJarfile, nsIFile* aSuggestedName,
}
#endif
extractHereSpec->Clone(getter_AddRefs(aRealName));
extractHereSpec->Clone(aRealName);
return nsInstall::SUCCESS;
}

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

@ -553,7 +553,7 @@ nsInstallPatch::NativePatch(nsIFile *sourceFile, nsIFile *patchFile, nsIFile **n
if (status == GDIFF_ERR_CHECKSUM)
status = GDIFF_ERR_CHECKSUM_RESULT;
rv = outFileSpec->Clone(getter_AddRefs(newFile));
rv = outFileSpec->Clone(newFile);
}
else
{
@ -616,7 +616,7 @@ nsInstallPatch::NativePatch(nsIFile *sourceFile, nsIFile *patchFile, nsIFile **n
anotherName->GetLeafName(&leaf);
anotherName->CopyTo(parent, leaf);
anotherName->Clone(getter_AddRefs(newFile));
anotherName->Clone(newFile);
}