Bug 332135 - atomservice should provide utf8 accessors, r=darin
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
*
|
||||
* Contributor(s):
|
||||
* Alec Flett <alecf@netscape.com>
|
||||
* Benjamin Smedberg <benjamin@smedbergs.us>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
@@ -65,3 +66,25 @@ nsAtomService::GetPermanentAtom(const PRUnichar *aString, nsIAtom ** aResult)
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAtomService::GetAtomUTF8(const char *aValue, nsIAtom* *aResult)
|
||||
{
|
||||
*aResult = NS_NewAtom(aValue);
|
||||
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAtomService::GetPermanentAtomUTF8(const char *aValue, nsIAtom* *aResult)
|
||||
{
|
||||
*aResult = NS_NewPermanentAtom(aValue);
|
||||
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user