mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-08 16:03:21 +00:00
bug #75504; sr=jband. simple fixes correcting where people inappropriately applied |getter_AddRefs|
This commit is contained in:
parent
2bbd5e07b9
commit
6860a0a739
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user