mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm.
--HG-- extra : rebase_source : c81ee11b9d08198a000979760a8e29a01e9498d0
This commit is contained in:
parent
259c778e9b
commit
d18fdecf67
@ -7814,9 +7814,10 @@ nsGlobalWindow::PromptOuter(const nsAString& aMessage,
|
||||
return;
|
||||
}
|
||||
|
||||
nsAdoptingString outValue(inoutValue);
|
||||
nsString outValue;
|
||||
outValue.Adopt(inoutValue);
|
||||
|
||||
if (ok && outValue) {
|
||||
if (ok && inoutValue) {
|
||||
aReturn.Assign(outValue);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ class nsACString;
|
||||
class nsAString;
|
||||
class nsString;
|
||||
class nsCString;
|
||||
class nsAdoptingString;
|
||||
class nsAdoptingCString;
|
||||
class nsXPIDLString;
|
||||
template<class T> class nsReadingIterator;
|
||||
|
@ -152,7 +152,7 @@ NS_IMETHODIMP nsTextToSubURI::UnEscapeURIForUI(const nsACString & aCharset,
|
||||
|
||||
// If there are any characters that are unsafe for URIs, reescape those.
|
||||
if (mUnsafeChars.IsEmpty()) {
|
||||
nsAdoptingString blacklist;
|
||||
nsAutoString blacklist;
|
||||
nsresult rv = mozilla::Preferences::GetString("network.IDN.blacklist_chars",
|
||||
blacklist);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -858,9 +858,11 @@ nsIndexedToHTML::OnInformationAvailable(nsIRequest *aRequest,
|
||||
nsISupports *aCtxt,
|
||||
const nsAString& aInfo) {
|
||||
nsAutoCString pushBuffer;
|
||||
nsAdoptingString escaped(nsEscapeHTML2(PromiseFlatString(aInfo).get()));
|
||||
if (!escaped)
|
||||
char16_t* str = nsEscapeHTML2(PromiseFlatString(aInfo).get());
|
||||
if (!str)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
nsString escaped;
|
||||
escaped.Adopt(str);
|
||||
pushBuffer.AppendLiteral("<tr>\n <td>");
|
||||
// escaped is provided in Unicode, so write hex NCRs as necessary
|
||||
// to prevent the HTML parser from applying a character set.
|
||||
|
@ -26,7 +26,6 @@ class nsACString;
|
||||
class nsAString;
|
||||
class nsString;
|
||||
class nsCString;
|
||||
class nsAdoptingString;
|
||||
class nsAdoptingCString;
|
||||
class nsXPIDLString;
|
||||
template<class T> class nsReadingIterator;
|
||||
|
Loading…
x
Reference in New Issue
Block a user