Bug 859817 - Make NS_NewAtom return already_AddRefed; r=bz

This commit is contained in:
Aryeh Gregor
2013-04-22 14:13:22 +03:00
parent 563acc033a
commit 03b4600974
15 changed files with 47 additions and 51 deletions

View File

@@ -14,7 +14,7 @@ nsAtomService::nsAtomService()
nsresult
nsAtomService::GetAtom(const nsAString& aString, nsIAtom ** aResult)
{
*aResult = NS_NewAtom(aString);
*aResult = NS_NewAtom(aString).get();
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;
@@ -36,7 +36,7 @@ nsAtomService::GetPermanentAtom(const nsAString& aString, nsIAtom ** aResult)
NS_IMETHODIMP
nsAtomService::GetAtomUTF8(const char *aValue, nsIAtom* *aResult)
{
*aResult = NS_NewAtom(aValue);
*aResult = NS_NewAtom(aValue).get();
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;