Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.

This commit is contained in:
Nicholas Nethercote
2017-07-31 14:28:48 +10:00
parent a222153d9c
commit 09493fcbcf
49 changed files with 216 additions and 229 deletions

View File

@@ -204,8 +204,8 @@ nsHtml5StreamParser::nsHtml5StreamParser(nsHtml5TreeOpExecutor* aExecutor,
// Chardet is initialized here even if it turns out to be useless
// to make the chardet refcount its observer (nsHtml5StreamParser)
// on the main thread.
const nsAdoptingCString& detectorName =
Preferences::GetLocalizedCString("intl.charset.detector");
nsAutoCString detectorName;
Preferences::GetLocalizedCString("intl.charset.detector", detectorName);
if (!detectorName.IsEmpty()) {
nsAutoCString detectorContractID;
detectorContractID.AssignLiteral(NS_CHARSET_DETECTOR_CONTRACTID_BASE);