Bug 738209 - Cleanup a usages of NS_Convert*to*() in places. r=mak

This commit is contained in:
Makoto Kato 2012-03-23 13:18:59 +09:00
parent 2bbc3d0175
commit 7ac19d776f
2 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ nsAndroidHistory::RegisterVisitedCallback(nsIURI *aURI, Link *aContent)
nsCAutoString uri;
nsresult rv = aURI->GetSpec(uri);
if (NS_FAILED(rv)) return rv;
nsString uriString = NS_ConvertUTF8toUTF16(uri);
NS_ConvertUTF8toUTF16 uriString(uri);
nsTArray<Link*>* list = mListeners.Get(uriString);
if (! list) {
@ -98,7 +98,7 @@ nsAndroidHistory::UnregisterVisitedCallback(nsIURI *aURI, Link *aContent)
nsCAutoString uri;
nsresult rv = aURI->GetSpec(uri);
if (NS_FAILED(rv)) return rv;
nsString uriString = NS_ConvertUTF8toUTF16(uri);
NS_ConvertUTF8toUTF16 uriString(uri);
nsTArray<Link*>* list = mListeners.Get(uriString);
if (! list)
@ -126,7 +126,7 @@ nsAndroidHistory::VisitURI(nsIURI *aURI, nsIURI *aLastVisitedURI, PRUint32 aFlag
nsCAutoString uri;
nsresult rv = aURI->GetSpec(uri);
if (NS_FAILED(rv)) return rv;
nsString uriString = NS_ConvertUTF8toUTF16(uri);
NS_ConvertUTF8toUTF16 uriString(uri);
bridge->MarkURIVisited(uriString);
}
return NS_OK;

View File

@ -791,7 +791,7 @@ nsNavHistory::TokensToQueries(const nsTArray<QueryKeyValuePair>& aTokens,
} else if (kvp.key.EqualsLiteral(QUERYKEY_TAG)) {
nsCAutoString unescaped(kvp.value);
NS_UnescapeURL(unescaped); // modifies input
nsString tag = NS_ConvertUTF8toUTF16(unescaped);
NS_ConvertUTF8toUTF16 tag(unescaped);
if (!tags.Contains(tag)) {
NS_ENSURE_TRUE(tags.AppendElement(tag), NS_ERROR_OUT_OF_MEMORY);
}