Bug 1386600 - Update nsIStringBundle method uses to account for them returning |AString| instead of |wstring|. r=jorgk.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 04 Aug 2017 10:32:30 +1000
changeset 29489 1a7802a4bf9d29357978d50236432e10bc088280
parent 29488 eeb9fb0aac793072b54e7dec4b75988b6611133b
child 29490 6b0c4e39b0d680dee1cfa688bbf92b1ab8907566
push id378
push userclokep@gmail.com
push dateMon, 13 Nov 2017 18:45:35 +0000
reviewersjorgk
bugs1386600
Bug 1386600 - Update nsIStringBundle method uses to account for them returning |AString| instead of |wstring|. r=jorgk.
mail/components/shell/nsMailGNOMEIntegration.cpp
mailnews/addrbook/src/nsAbCardProperty.cpp
mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
mailnews/addrbook/src/nsAbManager.cpp
mailnews/addrbook/src/nsAbView.cpp
mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
mailnews/addrbook/src/nsAddrDatabase.cpp
mailnews/base/search/src/nsMsgFilter.cpp
mailnews/base/search/src/nsMsgFilterService.cpp
mailnews/base/search/src/nsMsgFilterService.h
mailnews/base/src/nsMessenger.cpp
mailnews/base/src/nsMessengerOSXIntegration.mm
mailnews/base/src/nsMessengerUnixIntegration.cpp
mailnews/base/src/nsMessengerWinIntegration.cpp
mailnews/base/src/nsMsgAccountManager.cpp
mailnews/base/src/nsMsgAccountManagerDS.cpp
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/src/nsMsgFolderDataSource.cpp
mailnews/base/src/nsMsgOfflineManager.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgProgress.cpp
mailnews/base/src/nsMsgStatusFeedback.cpp
mailnews/base/src/nsSpamSettings.cpp
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/base/util/nsMsgDBFolder.h
mailnews/base/util/nsMsgIncomingServer.cpp
mailnews/base/util/nsMsgProtocol.cpp
mailnews/base/util/nsMsgUtils.cpp
mailnews/compose/src/nsMsgAttachmentHandler.cpp
mailnews/compose/src/nsMsgCompUtils.cpp
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/src/nsMsgPrompts.cpp
mailnews/compose/src/nsMsgSend.cpp
mailnews/compose/src/nsMsgSend.h
mailnews/compose/src/nsMsgSendReport.cpp
mailnews/compose/src/nsSmtpProtocol.cpp
mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
mailnews/extensions/mdn/src/nsMsgMdnGenerator.h
mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
mailnews/extensions/smime/src/nsMsgComposeSecure.h
mailnews/imap/src/nsImapIncomingServer.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapService.cpp
mailnews/imap/src/nsImapStringBundle.cpp
mailnews/import/applemail/src/nsAppleMailImport.cpp
mailnews/import/becky/src/nsBeckyMail.cpp
mailnews/import/becky/src/nsBeckyStringBundle.cpp
mailnews/import/becky/src/nsBeckyStringBundle.h
mailnews/import/src/nsImportMail.cpp
mailnews/import/src/nsImportStringBundle.cpp
mailnews/intl/nsCharsetConverterManager.cpp
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsParseMailbox.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/local/src/nsPop3Service.cpp
mailnews/local/src/nsPop3Sink.cpp
mailnews/mapi/mapihook/src/msgMapiHook.cpp
mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
mailnews/mime/emitters/nsMimeBaseEmitter.cpp
mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
mailnews/mime/src/mimemoz2.cpp
mailnews/news/src/nsNNTPNewsgroupList.cpp
mailnews/news/src/nsNNTPProtocol.cpp
mailnews/news/src/nsNewsDownloader.cpp
mailnews/news/src/nsNewsFolder.cpp
mailnews/news/src/nsNntpIncomingServer.cpp
suite/shell/src/nsGNOMEShellService.cpp
suite/shell/src/nsWindowsShellService.cpp
--- a/mail/components/shell/nsMailGNOMEIntegration.cpp
+++ b/mail/components/shell/nsMailGNOMEIntegration.cpp
@@ -304,18 +304,17 @@ nsMailGNOMEIntegration::MakeDefault(cons
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
     nsCOMPtr<nsIStringBundle> brandBundle;
     rv = bundleService->CreateBundle(BRAND_PROPERTIES, getter_AddRefs(brandBundle));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsString brandShortName;
-    brandBundle->GetStringFromName("brandShortName",
-                                   getter_Copies(brandShortName));
+    brandBundle->GetStringFromName("brandShortName", brandShortName);
 
     // use brandShortName as the application id.
     NS_ConvertUTF16toUTF8 id(brandShortName);
 
     nsCOMPtr<nsIGIOMimeApp> app;
     rv = giovfs->CreateAppFromCommand(mAppPath, id, getter_AddRefs(app));
     NS_ENSURE_SUCCESS(rv, rv);
 
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -728,17 +728,17 @@ nsresult nsAbCardProperty::ConvertToBase
   // Get Address Book string and set it as title of XML document
   nsCOMPtr<nsIStringBundle> bundle;
   nsCOMPtr<nsIStringBundleService> stringBundleService =
     mozilla::services::GetStringBundleService();
   if (stringBundleService) {
     rv = stringBundleService->CreateBundle(sAddrbookProperties, getter_AddRefs(bundle));
     if (NS_SUCCEEDED(rv)) {
       nsString addrBook;
-      rv = bundle->GetStringFromName("addressBook", getter_Copies(addrBook));
+      rv = bundle->GetStringFromName("addressBook", addrBook);
       if (NS_SUCCEEDED(rv)) {
         xmlStr.AppendLiteral("<title xmlns=\"http://www.w3.org/1999/xhtml\">");
         xmlStr.Append(addrBook);
         xmlStr.AppendLiteral("</title>\n");
       }
     }
   }
 
@@ -820,17 +820,17 @@ nsresult nsAbCardProperty::ConvertToXMLP
   }
   else {
     rv = AppendSection(CUSTOM_ATTRS_ARRAY, sizeof(CUSTOM_ATTRS_ARRAY)/sizeof(AppendItem), NS_LITERAL_STRING("headingDescription"),
          bundle, conv, xmlStr);
 
     xmlStr.AppendLiteral("<section><sectiontitle>");
 
     nsString headingAddresses;
-    rv = bundle->GetStringFromName("headingAddresses", getter_Copies(headingAddresses));
+    rv = bundle->GetStringFromName("headingAddresses", headingAddresses);
     NS_ENSURE_SUCCESS(rv, rv);
 
     xmlStr.Append(headingAddresses);
     xmlStr.AppendLiteral("</sectiontitle>");
 
     nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -908,17 +908,17 @@ nsresult nsAbCardProperty::AppendSection
   for (i=0;i<aCount;i++) {
     rv = GetPropertyAsAString(aArray[i].mColumn, attrValue);
     if (NS_SUCCEEDED(rv) && !attrValue.IsEmpty())
       sectionIsEmpty = false;
   }
 
   if (!sectionIsEmpty && !aHeading.IsEmpty()) {
     nsString heading;
-    rv = aBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aHeading).get(), getter_Copies(heading));
+    rv = aBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aHeading).get(), heading);
     NS_ENSURE_SUCCESS(rv, rv);
 
     aResult.AppendLiteral("<sectiontitle>");
     aResult.Append(heading);
     aResult.AppendLiteral("</sectiontitle>");
   }
 
   for (i=0;i<aCount;i++) {
@@ -986,17 +986,17 @@ nsresult nsAbCardProperty::AppendLabel(c
   nsresult rv;
   nsString label, attrValue;
 
   rv = GetPropertyAsAString(aItem.mColumn, attrValue);
 
   if (NS_FAILED(rv) || attrValue.IsEmpty())
     return NS_OK;
 
-  rv = aBundle->GetStringFromName(aItem.mLabel, getter_Copies(label));
+  rv = aBundle->GetStringFromName(aItem.mLabel, label);
   NS_ENSURE_SUCCESS(rv, rv);
 
   aResult.AppendLiteral("<labelrow><label>");
 
   aResult.Append(label);
   aResult.AppendLiteral(": </label>");
 
   rv = AppendLine(aItem, aConv, aResult);
@@ -1043,28 +1043,28 @@ nsresult nsAbCardProperty::AppendCitySta
 
   rv = AppendLine(item, aConv, zipResult);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsString formattedString;
 
   if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty()) {
     const char16_t *formatStrings[] = { cityResult.get(), stateResult.get(), zipResult.get() };
-    rv = aBundle->FormatStringFromName("cityAndStateAndZip", formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
+    rv = aBundle->FormatStringFromName("cityAndStateAndZip", formatStrings, ArrayLength(formatStrings), formattedString);
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && zipResult.IsEmpty()) {
     const char16_t *formatStrings[] = { cityResult.get(), stateResult.get() };
-    rv = aBundle->FormatStringFromName("cityAndStateNoZip", formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
+    rv = aBundle->FormatStringFromName("cityAndStateNoZip", formatStrings, ArrayLength(formatStrings), formattedString);
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else if ((!cityResult.IsEmpty() && stateResult.IsEmpty() && !zipResult.IsEmpty()) ||
           (cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty())) {
     const char16_t *formatStrings[] = { cityResult.IsEmpty() ? stateResult.get() : cityResult.get(), zipResult.get() };
-    rv = aBundle->FormatStringFromName("cityOrStateAndZip", formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
+    rv = aBundle->FormatStringFromName("cityOrStateAndZip", formatStrings, ArrayLength(formatStrings), formattedString);
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else {
     if (!cityResult.IsEmpty())
       formattedString = cityResult;
     else if (!stateResult.IsEmpty())
       formattedString = stateResult;
     else
@@ -1109,23 +1109,23 @@ NS_IMETHODIMP nsAbCardProperty::Generate
     }
 
     nsString result;
 
     if (aGenerateFormat == GENERATE_LAST_FIRST_ORDER) {
       const char16_t *stringParams[2] = {lastName.get(), firstName.get()};
 
       rv = bundle->FormatStringFromName("lastFirstFormat",
-                                        stringParams, 2, getter_Copies(result));
+                                        stringParams, 2, result);
     }
     else {
       const char16_t *stringParams[2] = {firstName.get(), lastName.get()};
 
       rv = bundle->FormatStringFromName("firstLastFormat",
-                                        stringParams, 2, getter_Copies(result));
+                                        stringParams, 2, result);
     }
     NS_ENSURE_SUCCESS(rv, rv); 
 
     aResult.Assign(result);
   }
 
   if (aResult.IsEmpty())
   {
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
@@ -256,22 +256,22 @@ nsresult nsAbLDAPProcessChangeLogData::G
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://messenger/locale/addressbook/addressBook.properties", getter_AddRefs(bundle));
     if (NS_FAILED (rv)) 
         return rv ;
 
     nsString title;
-    rv = bundle->GetStringFromName("AuthDlgTitle", getter_Copies(title));
+    rv = bundle->GetStringFromName("AuthDlgTitle", title);
     if (NS_FAILED (rv)) 
         return rv ;
 
     nsString desc;
-    rv = bundle->GetStringFromName("AuthDlgDesc", getter_Copies(desc));
+    rv = bundle->GetStringFromName("AuthDlgDesc", desc);
     if (NS_FAILED (rv)) 
         return rv ;
 
     nsString username;
     nsString password;
     bool btnResult = false;
 	rv = dialog->PromptUsernameAndPassword(title, desc, 
                                             NS_ConvertUTF8toUTF16(serverUri).get(), 
--- a/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
@@ -95,18 +95,17 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLD
                "bundle chrome://mozldap/locale/ldap.properties");
       InitFailed();
       return rv;
     }
 
     // get the title for the authentication prompt
     //
     nsString authPromptTitle;
-    rv = ldapBundle->GetStringFromName("authPromptTitle",
-                                       getter_Copies(authPromptTitle));
+    rv = ldapBundle->GetStringFromName("authPromptTitle", authPromptTitle);
     if (NS_FAILED(rv))
     {
       NS_ERROR("nsAbLDAPListenerBase::OnLDAPInit(): error getting"
                "'authPromptTitle' string from bundle "
                "chrome://mozldap/locale/ldap.properties");
       InitFailed();
       return rv;
     }
@@ -131,17 +130,17 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLD
     const char16_t *hostArray[1] = { hostTemp.get() };
 
     // format the hostname into the authprompt text string
     //
     nsString authPromptText;
     rv = ldapBundle->FormatStringFromName("authPromptText",
                                           hostArray,
                                           sizeof(hostArray) / sizeof(const char16_t *),
-                                          getter_Copies(authPromptText));
+                                          authPromptText);
     if (NS_FAILED(rv))
     {
       NS_ERROR("nsAbLDAPListenerBase::OnLDAPInit():"
                "error getting 'authPromptText' string from bundle "
                "chrome://mozldap/locale/ldap.properties");
       InitFailed();
       return rv;
     }
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -540,52 +540,52 @@ NS_IMETHODIMP nsAbManager::ExportAddress
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString dirName;
   aDirectory->GetDirName(dirName);
   const char16_t *formatStrings[] = { dirName.get() };
 
   nsString title;
   rv = bundle->FormatStringFromName("ExportAddressBookNameTitle", formatStrings,
-                                    ArrayLength(formatStrings), getter_Copies(title));
+                                    ArrayLength(formatStrings), title);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = filePicker->Init(aParentWin, title, nsIFilePicker::modeSave);
   NS_ENSURE_SUCCESS(rv, rv);
 
   filePicker->SetDefaultString(dirName);
 
   nsString filterString;
 
   // CSV: System charset and UTF-8.
-  rv = bundle->GetStringFromName("CSVFilesSysCharset", getter_Copies(filterString));
+  rv = bundle->GetStringFromName("CSVFilesSysCharset", filterString);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.csv"));
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = bundle->GetStringFromName("CSVFilesUTF8", getter_Copies(filterString));
+  rv = bundle->GetStringFromName("CSVFilesUTF8", filterString);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.csv"));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Tab separated: System charset and UTF-8.
-  rv = bundle->GetStringFromName("TABFilesSysCharset", getter_Copies(filterString));
+  rv = bundle->GetStringFromName("TABFilesSysCharset", filterString);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.tab; *.txt"));
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = bundle->GetStringFromName("TABFilesUTF8", getter_Copies(filterString));
+  rv = bundle->GetStringFromName("TABFilesUTF8", filterString);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.tab; *.txt"));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = bundle->GetStringFromName("VCFFiles", getter_Copies(filterString));
+  rv = bundle->GetStringFromName("VCFFiles", filterString);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.vcf"));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = bundle->GetStringFromName("LDIFFiles", getter_Copies(filterString));
+  rv = bundle->GetStringFromName("LDIFFiles", filterString);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.ldi; *.ldif"));
   NS_ENSURE_SUCCESS(rv, rv);
 
   int16_t dialogResult;
   filePicker->Show(&dialogResult);
 
   if (dialogResult == nsIFilePicker::returnCancel)
@@ -709,17 +709,17 @@ nsAbManager::ExportDirectoryToDelimitedT
   nsCString revisedName;
   nsString columnName;
 
   for (i = 0; i < ArrayLength(EXPORT_ATTRIBUTES_TABLE); i++) {
     if (EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID != 0) {
 
       // We don't need to truncate the string here as getter_Copies will
       // do that for us.
-      if (NS_FAILED(bundle->GetStringFromID(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID, getter_Copies(columnName))))
+      if (NS_FAILED(bundle->GetStringFromID(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID, columnName)))
         columnName.AppendInt(EXPORT_ATTRIBUTES_TABLE[i].plainTextStringID);
 
       rv = nsMsgI18NConvertFromUnicode(useUTF8 ? "UTF-8" : nsMsgI18NFileSystemCharset(),
                                        columnName, revisedName);
       NS_ENSURE_SUCCESS(rv,rv);
 
       rv = outputStream->Write(revisedName.get(),
                                revisedName.Length(),
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -1314,22 +1314,22 @@ NS_IMETHODIMP nsAbView::SwapFirstNameLas
                               "firstLastFormat";
 
             // Generate both ln/fn and fn/ln combination since we need both later
             // to check to see if the current display name was edited
             // note that fn/ln still hold the values before the swap
             nameString[0] = ln.get();
             nameString[1] = fn.get();
             rv = bundle->FormatStringFromName(formatString,
-                                              nameString, 2, getter_Copies(dnLnFn));
+                                              nameString, 2, dnLnFn);
             NS_ENSURE_SUCCESS(rv, rv);
             nameString[0] = fn.get();
             nameString[1] = ln.get();
             rv = bundle->FormatStringFromName(formatString,
-                                              nameString, 2, getter_Copies(dnFnLn));
+                                              nameString, 2, dnFnLn);
             NS_ENSURE_SUCCESS(rv, rv);
 
             // Get the current display name
             nsAutoString dn;
             rv = abCard->GetDisplayName(dn);
             NS_ENSURE_SUCCESS(rv, rv);
 
             // Swap the display name if not edited
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -282,17 +282,17 @@ nsAddbookProtocolHandler::BuildDirectory
   // Get Address Book string and set it as title of XML document
   nsCOMPtr<nsIStringBundle> bundle;
   nsCOMPtr<nsIStringBundleService> stringBundleService =
     mozilla::services::GetStringBundleService();
   if (stringBundleService) {
     rv = stringBundleService->CreateBundle("chrome://messenger/locale/addressbook/addressBook.properties", getter_AddRefs(bundle));
     if (NS_SUCCEEDED(rv)) {
       nsString addrBook;
-      rv = bundle->GetStringFromName("addressBook", getter_Copies(addrBook));
+      rv = bundle->GetStringFromName("addressBook", addrBook);
       if (NS_SUCCEEDED(rv)) {
         aOutput.AppendLiteral("<title xmlns=\"http://www.w3.org/1999/xhtml\">");
         aOutput.Append(addrBook);
         aOutput.AppendLiteral("</title>\n");
       }
     }
   }
 
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -407,21 +407,21 @@ nsresult nsAddrDatabase::DisplayAlert(co
   NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://messenger/locale/addressbook/addressBook.properties", getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString alertMessage;
   rv = bundle->FormatStringFromName(NS_ConvertUTF16toUTF8(alertStringName).get(), formatStrings, numFormatStrings,
-    getter_Copies(alertMessage));
+    alertMessage);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString alertTitle;
-  rv = bundle->GetStringFromName(NS_ConvertUTF16toUTF8(titleName).get(), getter_Copies(alertTitle));
+  rv = bundle->GetStringFromName(NS_ConvertUTF16toUTF8(titleName).get(), alertTitle);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIPromptService> prompter =
       do_GetService(NS_PROMPTSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return prompter->Alert(nullptr /* we don't know the parent window */, alertTitle.get(), alertMessage.get());
 }
--- a/mailnews/base/search/src/nsMsgFilter.cpp
+++ b/mailnews/base/search/src/nsMsgFilter.cpp
@@ -574,28 +574,28 @@ nsMsgFilter::LogRuleHitGeneric(nsIMsgRul
       NS_ConvertASCIItoUTF16 tcode16(tcode) ;
       NS_ConvertASCIItoUTF16 tErrmsg16(aErrmsg) ;
 
       const char16_t *logErrorFormatStrings[2] = { tErrmsg16.get(),  tcode16.get()};
       nsString filterFailureWarningPrefix;
       rv = bundle->FormatStringFromName(
                       "filterFailureWarningPrefix",
                       logErrorFormatStrings, 2,
-                      getter_Copies(filterFailureWarningPrefix));
+                      filterFailureWarningPrefix);
       NS_ENSURE_SUCCESS(rv, rv);
       buffer += NS_ConvertUTF16toUTF8(filterFailureWarningPrefix);
       buffer += "\n";
     }
 
     const char16_t *filterLogDetectFormatStrings[4] = { filterName.get(), authorValue.get(), subjectValue.get(), dateValue.get() };
     nsString filterLogDetectStr;
     rv = bundle->FormatStringFromName(
       "filterLogDetectStr",
       filterLogDetectFormatStrings, 4,
-      getter_Copies(filterLogDetectStr));
+      filterLogDetectStr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     buffer += NS_ConvertUTF16toUTF8(filterLogDetectStr);
     buffer +=  "\n";
 
     if (actionType == nsMsgFilterAction::MoveToFolder ||
         actionType == nsMsgFilterAction::CopyToFolder)
     {
@@ -608,41 +608,41 @@ nsMsgFilter::LogRuleHitGeneric(nsIMsgRul
       NS_ConvertASCIItoUTF16 msgIdValue(msgId);
 
       const char16_t *logMoveFormatStrings[2] = { msgIdValue.get(), actionFolderUriValue.get() };
       nsString logMoveStr;
       rv = bundle->FormatStringFromName(
         (actionType == nsMsgFilterAction::MoveToFolder) ?
           "logMoveStr" : "logCopyStr",
         logMoveFormatStrings, 2,
-        getter_Copies(logMoveStr));
+        logMoveStr);
       NS_ENSURE_SUCCESS(rv, rv);
 
       buffer += NS_ConvertUTF16toUTF8(logMoveStr);
     }
     else if (actionType == nsMsgFilterAction::Custom)
     {
       nsCOMPtr<nsIMsgFilterCustomAction> customAction;
       nsAutoString filterActionName;
       rv = aFilterAction->GetCustomAction(getter_AddRefs(customAction));
       if (NS_SUCCEEDED(rv) && customAction)
         customAction->GetName(filterActionName);
       if (filterActionName.IsEmpty())
         bundle->GetStringFromName(
                   "filterMissingCustomAction",
-                  getter_Copies(filterActionName));
+                  filterActionName);
       buffer += NS_ConvertUTF16toUTF8(filterActionName);
     }
     else
     {
       nsString actionValue;
       nsAutoCString filterActionID;
       filterActionID = NS_LITERAL_CSTRING("filterAction");
       filterActionID.AppendInt(actionType);
-      rv = bundle->GetStringFromName(filterActionID.get(), getter_Copies(actionValue));
+      rv = bundle->GetStringFromName(filterActionID.get(), actionValue);
       NS_ENSURE_SUCCESS(rv, rv);
 
       buffer += NS_ConvertUTF16toUTF8(actionValue);
     }
     buffer += "\n";
 
     // Prepare timestamp
     PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &exploded);
--- a/mailnews/base/search/src/nsMsgFilterService.cpp
+++ b/mailnews/base/search/src/nsMsgFilterService.cpp
@@ -204,26 +204,23 @@ nsresult nsMsgFilterService::BackUpFilte
 }
 
 nsresult nsMsgFilterService::AlertBackingUpFilterFile(nsIMsgWindow *aMsgWindow)
 {
   return ThrowAlertMsg("filterListBackUpMsg", aMsgWindow);
 }
 
 nsresult //Do not use this routine if you have to call it very often because it creates a new bundle each time
-nsMsgFilterService::GetStringFromBundle(const char *aMsgName, char16_t **aResult)
+nsMsgFilterService::GetStringFromBundle(const char *aMsgName, nsAString& aResult)
 {
-  NS_ENSURE_ARG_POINTER(aResult);
-
   nsCOMPtr <nsIStringBundle> bundle;
   nsresult rv = GetFilterStringBundle(getter_AddRefs(bundle));
   if (NS_SUCCEEDED(rv) && bundle)
     rv = bundle->GetStringFromName(aMsgName, aResult);
   return rv;
-
 }
 
 nsresult
 nsMsgFilterService::GetFilterStringBundle(nsIStringBundle **aBundle)
 {
   NS_ENSURE_ARG_POINTER(aBundle);
 
   nsCOMPtr<nsIStringBundleService> bundleService =
@@ -236,17 +233,17 @@ nsMsgFilterService::GetFilterStringBundl
   NS_IF_ADDREF(*aBundle = bundle);
   return NS_OK;
 }
 
 nsresult
 nsMsgFilterService::ThrowAlertMsg(const char*aMsgName, nsIMsgWindow *aMsgWindow)
 {
   nsString alertString;
-  nsresult rv = GetStringFromBundle(aMsgName, getter_Copies(alertString));
+  nsresult rv = GetStringFromBundle(aMsgName, alertString);
   nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryInterface(aMsgWindow));
   if (!msgWindow) {
     nsCOMPtr<nsIMsgMailSession> mailSession ( do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv))
       rv = mailSession->GetTopmostMsgWindow(getter_AddRefs(msgWindow));
   }
 
   if (NS_SUCCEEDED(rv) && !alertString.IsEmpty() && msgWindow)
@@ -1177,17 +1174,17 @@ bool nsMsgFilterAfterTheFact::ContinueEx
   m_curFilter->GetFilterName(filterName);
   nsString formatString;
   nsString confirmText;
   const char16_t *formatStrings[] =
   {
     filterName.get()
   };
   nsresult rv = bundle->FormatStringFromName("continueFilterExecution",
-                                             formatStrings, 1, getter_Copies(confirmText));
+                                             formatStrings, 1, confirmText);
   if (NS_FAILED(rv))
     return false;
   bool returnVal = false;
   (void) DisplayConfirmationPrompt(m_msgWindow, confirmText.get(), &returnVal);
   return returnVal;
 }
 
 nsresult
--- a/mailnews/base/search/src/nsMsgFilterService.h
+++ b/mailnews/base/search/src/nsMsgFilterService.h
@@ -26,17 +26,17 @@ public:
   NS_DECL_NSIMSGFILTERSERVICE
 /* clients call OpenFilterList to get a handle to a FilterList, of existing nsMsgFilter *.
   These are manipulated by the front end as a result of user interaction
    with dialog boxes. To apply the new list call MSG_CloseFilterList.
 */
   nsresult BackUpFilterFile(nsIFile *aFilterFile, nsIMsgWindow *aMsgWindow);
   nsresult AlertBackingUpFilterFile(nsIMsgWindow *aMsgWindow);
   nsresult ThrowAlertMsg(const char*aMsgName, nsIMsgWindow *aMsgWindow);
-  nsresult GetStringFromBundle(const char *aMsgName, char16_t **aResult);
+  nsresult GetStringFromBundle(const char *aMsgName, nsAString& aResult);
   nsresult GetFilterStringBundle(nsIStringBundle **aBundle);
 
 protected:
   virtual ~nsMsgFilterService();
 
   nsCOMArray<nsIMsgFilterCustomAction> mCustomActions; // defined custom action list
   nsCOMArray<nsIMsgSearchCustomTerm> mCustomTerms; // defined custom term list
 
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -323,17 +323,17 @@ nsMessenger::PromptIfFileExists(nsIFile 
 
     if (!mStringBundle)
     {
       rv = InitStringBundle();
       NS_ENSURE_SUCCESS(rv, rv);
     }
     rv = mStringBundle->FormatStringFromName("fileExists",
                                              pathFormatStrings, 1,
-                                             getter_Copies(errorMessage));
+                                             errorMessage);
     NS_ENSURE_SUCCESS(rv, rv);
     rv = dialog->Confirm(nullptr, errorMessage.get(), &dialogResult);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (dialogResult)
     {
       return NS_OK; // user says okay to replace
     }
@@ -839,17 +839,17 @@ nsMessenger::SaveOneAttachment(const cha
     {
       rv = InitStringBundle();
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
     nsString filterName;
     const char16_t *extensionParam[] = { extension.get() };
     rv = mStringBundle->FormatStringFromName(
-      "saveAsType", extensionParam, 1, getter_Copies(filterName));
+      "saveAsType", extensionParam, 1, filterName);
     NS_ENSURE_SUCCESS(rv, rv);
 
     extension.Insert(NS_LITERAL_STRING("*."), 0);
     filePicker->AppendFilter(filterName, extension);
   }
 
   filePicker->AppendFilters(nsIFilePicker::filterAll);
 
@@ -2040,17 +2040,17 @@ nsMessenger::GetString(const nsString& a
 {
   nsresult rv;
   aValue.Truncate();
 
   if (!mStringBundle)
     rv = InitStringBundle();
 
   if (mStringBundle)
-    rv = mStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), getter_Copies(aValue));
+    rv = mStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), aValue);
   else
     rv = NS_ERROR_FAILURE;
 
   if (NS_FAILED(rv) || aValue.IsEmpty())
     aValue = aStringName;
   return;
 }
 
@@ -3067,17 +3067,17 @@ nsMessenger::PromptIfDeleteAttachments(b
     attachmentList.Append(char16_t('\n'));
   }
   const char16_t *formatStrings[] = { attachmentList.get() };
 
   // format the message and display
   nsString promptMessage;
   const char * propertyName = aSaveFirst ?
     "detachAttachments" : "deleteAttachments";
-  rv = mStringBundle->FormatStringFromName(propertyName, formatStrings, 1,getter_Copies(promptMessage));
+  rv = mStringBundle->FormatStringFromName(propertyName, formatStrings, 1,promptMessage);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool dialogResult = false;
   rv = dialog->Confirm(nullptr, promptMessage.get(), &dialogResult);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return dialogResult ? NS_OK : NS_ERROR_FAILURE;
 }
--- a/mailnews/base/src/nsMessengerOSXIntegration.mm
+++ b/mailnews/base/src/nsMessengerOSXIntegration.mm
@@ -331,28 +331,28 @@ nsMessengerOSXIntegration::FillToolTipIn
       if (numNotDisplayed > 0)
       {
         nsAutoString numNotDisplayedText;
         numNotDisplayedText.AppendInt(numNotDisplayed);
         const char16_t *formatStrings[3] = { numNewMsgsText.get(), authors.get(), numNotDisplayedText.get() };
         bundle->FormatStringFromName("macBiffNotification_messages_extra",
                                      formatStrings,
                                      3,
-                                     getter_Copies(finalText));
+                                     finalText);
       }
       else
       {
         const char16_t *formatStrings[2] = { numNewMsgsText.get(), authors.get() };
 
         if (aNewCount == 1)
         {
           bundle->FormatStringFromName("macBiffNotification_message",
                                        formatStrings,
                                        2,
-                                       getter_Copies(finalText));
+                                       finalText);
           // Since there is only 1 message, use the most recent mail's URI instead of the folder's
           nsCOMPtr<nsIMsgDatabase> db;
           rv = aFolder->GetMsgDatabase(getter_AddRefs(db));
           if (NS_SUCCEEDED(rv) && db)
           {
             uint32_t numNewKeys;
             uint32_t *newMessageKeys;
             rv = db->GetNewList(&numNewKeys, &newMessageKeys);
@@ -366,17 +366,17 @@ nsMessengerOSXIntegration::FillToolTipIn
             }
             NS_Free(newMessageKeys);
           }
         }
         else
           bundle->FormatStringFromName("macBiffNotification_messages",
                                        formatStrings,
                                        2,
-                                       getter_Copies(finalText));
+                                       finalText);
       }
       ShowAlertMessage(accountName, finalText, uri);
     } // if we got a bundle
   } // if we got a folder
 }
 
 nsresult
 nsMessengerOSXIntegration::ShowAlertMessage(const nsAString& aAlertTitle,
@@ -621,17 +621,17 @@ nsMessengerOSXIntegration::GetNewMailAut
     if (!bundle)
       return NS_ERROR_FAILURE;
 
     uint32_t *newMessageKeys;
     rv = db->GetNewList(&numNewKeys, &newMessageKeys);
     if (NS_SUCCEEDED(rv))
     {
       nsString listSeparator;
-      bundle->GetStringFromName("macBiffNotification_separator", getter_Copies(listSeparator));
+      bundle->GetStringFromName("macBiffNotification_separator", listSeparator);
 
       int32_t displayed = 0;
       for (int32_t i = numNewKeys - 1; i >= 0; i--, aNewCount--)
       {
         if (0 == aNewCount || displayed == kMaxDisplayCount)
           break;
 
         nsCOMPtr<nsIMsgDBHdr> hdr;
--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp
@@ -173,17 +173,17 @@ nsMessengerUnixIntegration::BuildNotific
   const char16_t *formatStrings[] =
   {
     accountName.get(), numNewMsgsText.get()
   };
 
   aBundle->FormatStringFromName(numNewMessages == 1 ?
                                   "newMailNotification_message" :
                                   "newMailNotification_messages",
-                                formatStrings, 2, getter_Copies(aTitle));
+                                formatStrings, 2, aTitle);
   return true;
 }
 
 /* This comparator lets us sort an nsCOMArray of nsIMsgDBHdr's by
  * their dateInSeconds attributes in ascending order.
  */
 static int
 nsMsgDbHdrTimestampComparator(nsIMsgDBHdr *aElement1,
@@ -291,17 +291,17 @@ nsMessengerUnixIntegration::BuildNotific
   if (showSubject && showSender)
   {
     nsString msgTitle;
     const char16_t *formatStrings[] =
     {
       subject.get(), author.get()
     };
     aBundle->FormatStringFromName("newMailNotification_messagetitle",
-        formatStrings, 2, getter_Copies(msgTitle));
+        formatStrings, 2, msgTitle);
     alertBody.Append(msgTitle);
   }
   else if (showSubject)
     alertBody.Append(subject);
   else if (showSender)
     alertBody.Append(author);
 
   if (showPreview && (showSubject || showSender))
--- a/mailnews/base/src/nsMessengerWinIntegration.cpp
+++ b/mailnews/base/src/nsMessengerWinIntegration.cpp
@@ -676,19 +676,19 @@ void nsMessengerWinIntegration::FillTool
 
         const char16_t *formatStrings[] =
         {
           numNewMsgsText.get(),
         };
 
         nsString finalText;
         if (numNewMessages == 1)
-          bundle->FormatStringFromName("biffNotification_message", formatStrings, 1, getter_Copies(finalText));
+          bundle->FormatStringFromName("biffNotification_message", formatStrings, 1, finalText);
         else
-          bundle->FormatStringFromName("biffNotification_messages", formatStrings, 1, getter_Copies(finalText));
+          bundle->FormatStringFromName("biffNotification_messages", formatStrings, 1, finalText);
 
         // the alert message is special...we actually only want to show the first account with
         // new mail in the alert.
         if (animatedAlertText.IsEmpty()) // if we haven't filled in the animated alert text yet
           animatedAlertText = finalText;
 
         toolTipLine.Append(accountName);
         toolTipLine.Append(' ');
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -2295,17 +2295,17 @@ nsresult nsMsgAccountManager::GetLocalFo
   nsCOMPtr<nsIStringBundleService> sBundleService =
     mozilla::services::GetStringBundleService();
   NS_ENSURE_TRUE(sBundleService, NS_ERROR_UNEXPECTED);
 
   rv = sBundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
                                     getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return bundle->GetStringFromName("localFolders", getter_Copies(localFoldersName));
+  return bundle->GetStringFromName("localFolders", localFoldersName);
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::CreateLocalMailAccount()
 {
   // create the server
   nsCOMPtr<nsIMsgIncomingServer> server;
   nsresult rv = CreateIncomingServer(NS_LITERAL_CSTRING("nobody"),
--- a/mailnews/base/src/nsMsgAccountManagerDS.cpp
+++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp
@@ -276,37 +276,30 @@ nsMsgAccountManagerDataSource::GetTarget
   if (property == kNC_Name || property == kNC_FolderTreeName ||
       property == kNC_FolderTreeSimpleName) 
   {
     rv = getStringBundle();
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsString pageTitle;
     if (source == kNC_PageTitleServer)
-      mStringBundle->GetStringFromName("prefPanel-server",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-server", pageTitle);
 
     else if (source == kNC_PageTitleCopies)
-      mStringBundle->GetStringFromName("prefPanel-copies",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-copies", pageTitle);
     else if (source == kNC_PageTitleSynchronization)
-      mStringBundle->GetStringFromName("prefPanel-synchronization",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-synchronization", pageTitle);
     else if (source == kNC_PageTitleDiskSpace)
-      mStringBundle->GetStringFromName("prefPanel-diskspace",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-diskspace", pageTitle);
     else if (source == kNC_PageTitleAddressing)
-      mStringBundle->GetStringFromName("prefPanel-addressing",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-addressing", pageTitle);
     else if (source == kNC_PageTitleSMTP)
-      mStringBundle->GetStringFromName("prefPanel-smtp",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-smtp", pageTitle);
     else if (source == kNC_PageTitleJunk)
-      mStringBundle->GetStringFromName("prefPanel-junk",
-                                       getter_Copies(pageTitle));
+      mStringBundle->GetStringFromName("prefPanel-junk", pageTitle);
 
     else {
       // if it's a server, use the pretty name
       nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(source, &rv);
       if (NS_SUCCEEDED(rv) && folder) {
         bool isServer;
         rv = folder->GetIsServer(&isServer);
         if (NS_SUCCEEDED(rv) && isServer)
@@ -344,17 +337,17 @@ nsMsgAccountManagerDataSource::GetTarget
         nsCOMPtr <nsIStringBundle> bundle;
         rv = strBundleService->CreateBundle(bundleURL.get(), getter_AddRefs(bundle));
 
         NS_ENSURE_SUCCESS(rv,rv);
 
         nsAutoCString panelTitleName;
         panelTitleName.AssignLiteral("prefPanel-");
         panelTitleName.Append(sourceValue + strlen(NC_RDF_PAGETITLE_PREFIX));
-        bundle->GetStringFromName(panelTitleName.get(), getter_Copies(pageTitle));
+        bundle->GetStringFromName(panelTitleName.get(), pageTitle);
       }
     }
     str = pageTitle.get();
   }
   else if (property == kNC_PageTag) {
     // do NOT localize these strings. these are the urls of the XUL files
     if (source == kNC_PageTitleServer)
       str.AssignLiteral("am-server.xul");
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -206,32 +206,32 @@ nsresult nsMsgDBView::InitLabelStrings()
   }
   return rv;
 }
 
 // helper function used to fetch strings from the messenger string bundle
 char16_t * nsMsgDBView::GetString(const char16_t *aStringName)
 {
   nsresult    res = NS_ERROR_UNEXPECTED;
-  char16_t   *ptrv = nullptr;
+  nsAutoString str;
 
   if (!mMessengerStringBundle)
   {
     static const char propertyURL[] = MESSENGER_STRING_URL;
     nsCOMPtr<nsIStringBundleService> sBundleService =
       mozilla::services::GetStringBundleService();
     if (sBundleService)
       res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mMessengerStringBundle));
   }
 
   if (mMessengerStringBundle)
-    res = mMessengerStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), &ptrv);
-
-  if ( NS_SUCCEEDED(res) && (ptrv) )
-    return ptrv;
+    res = mMessengerStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), str);
+
+  if (NS_SUCCEEDED(res))
+    return ToNewUnicode(str);
   else
     return NS_strdup(aStringName);
 }
 
 // helper function used to fetch localized strings from the prefs
 nsresult nsMsgDBView::GetPrefLocalizedString(const char *aPrefName, nsString& aResult)
 {
   nsresult rv = NS_OK;
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -339,17 +339,17 @@ nsresult nsFolderCompactState::ShowStatu
     if (NS_FAILED(rv))
       break;
     nsCOMPtr<nsIStringBundle> bundle;
     rv = GetBaseStringBundle(getter_AddRefs(bundle));
     if (NS_FAILED(rv))
       break;
     const char16_t *params[] = { accountName.get(), aMsg.get() };
     rv = bundle->FormatStringFromName("statusMessage",
-                                      params, 2, getter_Copies(statusMessage));
+                                      params, 2, statusMessage);
   } while (false);
 
   // If fetching any of the needed info failed, just show the original message.
   if (NS_FAILED(rv))
     statusMessage.Assign(aMsg);
   return statusFeedback->SetStatusString(statusMessage);
 }
 
@@ -683,17 +683,17 @@ void nsFolderCompactState::ShowDoneStatu
     nsString statusString;
     nsCOMPtr <nsIStringBundle> bundle;
     nsresult rv = GetBaseStringBundle(getter_AddRefs(bundle));
     NS_ENSURE_SUCCESS_VOID(rv);
     nsAutoString expungedAmount;
     FormatFileSize(m_totalExpungedBytes, true, expungedAmount);
     const char16_t* params[] = { expungedAmount.get() };
     rv = bundle->FormatStringFromName("compactingDone",
-                                      params, 1, getter_Copies(statusString));
+                                      params, 1, statusString);
 
     if (!statusString.IsEmpty() && NS_SUCCEEDED(rv))
       ShowStatusMsg(statusString);
   }
 }
 
 nsresult
 nsFolderCompactState::CompactNextFolder()
--- a/mailnews/base/src/nsMsgFolderDataSource.cpp
+++ b/mailnews/base/src/nsMsgFolderDataSource.cpp
@@ -1982,17 +1982,17 @@ nsresult nsMsgFolderDataSource::DoDelete
         NS_ENSURE_ARG_POINTER(msgWindow);
         nsCOMPtr<nsIStringBundleService> sBundleService =
           mozilla::services::GetStringBundleService();
         NS_ENSURE_TRUE(sBundleService, NS_ERROR_UNEXPECTED);
         nsCOMPtr<nsIStringBundle> sMessengerStringBundle;
         nsString confirmMsg;
         rv = sBundleService->CreateBundle(MESSENGER_STRING_URL, getter_AddRefs(sMessengerStringBundle));
         NS_ENSURE_SUCCESS(rv, rv);
-        sMessengerStringBundle->GetStringFromName("confirmSavedSearchDeleteMessage", getter_Copies(confirmMsg));
+        sMessengerStringBundle->GetStringFromName("confirmSavedSearchDeleteMessage", confirmMsg);
 
         nsCOMPtr<nsIPrompt> dialog;
         rv = msgWindow->GetPromptDialog(getter_AddRefs(dialog));
         if (NS_SUCCEEDED(rv))
         {
           bool dialogResult;
           rv = dialog->Confirm(nullptr, confirmMsg.get(), &dialogResult);
           if (!dialogResult)
--- a/mailnews/base/src/nsMsgOfflineManager.cpp
+++ b/mailnews/base/src/nsMsgOfflineManager.cpp
@@ -244,18 +244,17 @@ nsresult nsMsgOfflineManager::ShowStatus
     nsCOMPtr<nsIStringBundleService> sBundleService = 
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(sBundleService, NS_ERROR_UNEXPECTED);
     sBundleService->CreateBundle(MESSENGER_STRING_URL, getter_AddRefs(mStringBundle));
     return NS_OK;
   }
 
   nsString statusString;
-  nsresult res = mStringBundle->GetStringFromName(statusMsgName,
-						  getter_Copies(statusString));
+  nsresult res = mStringBundle->GetStringFromName(statusMsgName, statusString);
 
   if (NS_SUCCEEDED(res) && m_statusFeedback)
     m_statusFeedback->ShowStatusString(statusString);
 
   return res;
 }
 
 nsresult nsMsgOfflineManager::DownloadOfflineNewsgroups()
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -568,17 +568,17 @@ nsMsgPrintEngine::GetString(const char16
 
     nsCOMPtr<nsIStringBundleService> sBundleService = 
       mozilla::services::GetStringBundleService();
     if (sBundleService)
       sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
   }
 
   if (mStringBundle)
-    mStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), getter_Copies(outStr));
+    mStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), outStr);
   return;
 }
 
 //-----------------------------------------------------------
 void
 nsMsgPrintEngine::PrintMsgWindow()
 {
   const char* kMsgKeys[] = {"PrintingMessage",  "PrintPreviewMessage",
--- a/mailnews/base/src/nsMsgProgress.cpp
+++ b/mailnews/base/src/nsMsgProgress.cpp
@@ -251,12 +251,12 @@ NS_IMETHODIMP nsMsgProgress::OnProgress(
 NS_IMETHODIMP nsMsgProgress::OnStatus(nsIRequest *request, nsISupports* ctxt,
                                       nsresult aStatus, const char16_t* aStatusArg)
 {
   nsresult rv;
   nsCOMPtr<nsIStringBundleService> sbs =
     mozilla::services::GetStringBundleService();
   NS_ENSURE_TRUE(sbs, NS_ERROR_UNEXPECTED);
   nsString str;
-  rv = sbs->FormatStatusMessage(aStatus, aStatusArg, getter_Copies(str));
+  rv = sbs->FormatStatusMessage(aStatus, aStatusArg, str);
   NS_ENSURE_SUCCESS(rv, rv);
   return ShowStatusString(str);
 }
--- a/mailnews/base/src/nsMsgStatusFeedback.cpp
+++ b/mailnews/base/src/nsMsgStatusFeedback.cpp
@@ -82,18 +82,17 @@ nsMsgStatusFeedback::OnStateChange(nsIWe
   NS_ENSURE_TRUE(mBundle, NS_ERROR_NULL_POINTER);
   if (aProgressStateFlags & STATE_IS_NETWORK)
   {
     if (aProgressStateFlags & STATE_START)
     {
       m_lastPercent = 0;
       StartMeteors();
       nsString loadingDocument;
-      rv = mBundle->GetStringFromName("documentLoading",
-                                      getter_Copies(loadingDocument));
+      rv = mBundle->GetStringFromName("documentLoading", loadingDocument);
       if (NS_SUCCEEDED(rv))
         ShowStatusString(loadingDocument);
     }
     else if (aProgressStateFlags & STATE_STOP)
     {
       // if we are loading message for display purposes, this STATE_STOP notification is 
       // the only notification we get when layout is actually done rendering the message. We need
       // to fire the appropriate msgHdrSink notification in this particular case.
@@ -136,18 +135,17 @@ nsMsgStatusFeedback::OnStateChange(nsIWe
               if (msgFolder && msgHdr)
                 msgFolder->NotifyPropertyFlagChanged(msgHdr, m_msgLoadedAtom, 0, 1);
             }
           }
         }
       }
       StopMeteors();
       nsString documentDone;
-      rv = mBundle->GetStringFromName("documentDone",
-                                      getter_Copies(documentDone));
+      rv = mBundle->GetStringFromName("documentDone", documentDone);
       if (NS_SUCCEEDED(rv))
         ShowStatusString(documentDone);
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgStatusFeedback::OnLocationChange(nsIWebProgress* aWebProgress,
@@ -273,31 +271,31 @@ NS_IMETHODIMP nsMsgStatusFeedback::OnSta
       server->GetPrettyName(accountName);
   }
 
   // forming the status message
   nsCOMPtr<nsIStringBundleService> sbs =
     mozilla::services::GetStringBundleService();
   NS_ENSURE_TRUE(sbs, NS_ERROR_UNEXPECTED);
   nsString str;
-  rv = sbs->FormatStatusMessage(aStatus, aStatusArg, getter_Copies(str));
+  rv = sbs->FormatStatusMessage(aStatus, aStatusArg, str);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // prefixing the account name to the status message if status message isn't blank
   // and doesn't already contain the account name.
   nsString statusMessage;
   if (!str.IsEmpty() && str.Find(accountName) == kNotFound)
   {
     nsCOMPtr<nsIStringBundle> bundle;
     rv = sbs->CreateBundle(MSGS_URL, getter_AddRefs(bundle));
     const char16_t *params[] = { accountName.get(),
                                   str.get() };
     rv = bundle->FormatStringFromName(
       "statusMessage",
-      params, 2, getter_Copies(statusMessage));
+      params, 2, statusMessage);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   else
   {
     statusMessage.Assign(str);
   }
   return ShowStatusString(statusMessage);
 }
--- a/mailnews/base/src/nsSpamSettings.cpp
+++ b/mailnews/base/src/nsSpamSettings.cpp
@@ -671,17 +671,17 @@ NS_IMETHODIMP nsSpamSettings::LogJunkHit
     getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   const char16_t *junkLogDetectFormatStrings[3] = { authorValue.get(), subjectValue.get(), dateValue.get() };
   nsString junkLogDetectStr;
   rv = bundle->FormatStringFromName(
     "junkLogDetectStr",
     junkLogDetectFormatStrings, 3,
-    getter_Copies(junkLogDetectStr));
+    junkLogDetectStr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   buffer += NS_ConvertUTF16toUTF8(junkLogDetectStr);
   buffer +=  "\n";
 
   if (aMoveMessage) {
     nsCString msgId;
     aMsgHdr->GetMessageId(getter_Copies(msgId));
@@ -693,17 +693,17 @@ NS_IMETHODIMP nsSpamSettings::LogJunkHit
     NS_ConvertASCIItoUTF16 msgIdValue(msgId);
     NS_ConvertASCIItoUTF16 junkFolderURIValue(junkFolderURI);
 
     const char16_t *logMoveFormatStrings[2] = { msgIdValue.get(), junkFolderURIValue.get() };
     nsString logMoveStr;
     rv = bundle->FormatStringFromName(
       "logMoveStr",
       logMoveFormatStrings, 2,
-      getter_Copies(logMoveStr));
+      logMoveStr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     buffer += NS_ConvertUTF16toUTF8(logMoveStr);
     buffer += "\n";
   }
 
   return LogJunkString(buffer.get());
 }
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -82,26 +82,26 @@ static PRTime gtimeOfLastPurgeCheck;    
 #define PREF_MAIL_WARN_FILTER_CHANGED "mail.warn_filter_changed"
 
 const char *kUseServerRetentionProp = "useServerRetention";
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 
 nsICollation * nsMsgDBFolder::gCollationKeyGenerator = nullptr;
 
-char16_t *nsMsgDBFolder::kLocalizedInboxName;
-char16_t *nsMsgDBFolder::kLocalizedTrashName;
-char16_t *nsMsgDBFolder::kLocalizedSentName;
-char16_t *nsMsgDBFolder::kLocalizedDraftsName;
-char16_t *nsMsgDBFolder::kLocalizedTemplatesName;
-char16_t *nsMsgDBFolder::kLocalizedUnsentName;
-char16_t *nsMsgDBFolder::kLocalizedJunkName;
-char16_t *nsMsgDBFolder::kLocalizedArchivesName;
-
-char16_t *nsMsgDBFolder::kLocalizedBrandShortName;
+nsString nsMsgDBFolder::kLocalizedInboxName;
+nsString nsMsgDBFolder::kLocalizedTrashName;
+nsString nsMsgDBFolder::kLocalizedSentName;
+nsString nsMsgDBFolder::kLocalizedDraftsName;
+nsString nsMsgDBFolder::kLocalizedTemplatesName;
+nsString nsMsgDBFolder::kLocalizedUnsentName;
+nsString nsMsgDBFolder::kLocalizedJunkName;
+nsString nsMsgDBFolder::kLocalizedArchivesName;
+
+nsString nsMsgDBFolder::kLocalizedBrandShortName;
 
 nsrefcnt nsMsgDBFolder::mInstanceCount=0;
 
 NS_IMPL_ISUPPORTS_INHERITED(nsMsgDBFolder, nsRDFResource, 
                              nsISupportsWeakReference, nsIMsgFolder,
                              nsIDBChangeListener, nsIUrlListener,
                              nsIJunkMailClassificationListener,
                              nsIMsgTraitClassificationListener)
@@ -152,25 +152,16 @@ nsMsgDBFolder::nsMsgDBFolder(void)
 
 nsMsgDBFolder::~nsMsgDBFolder(void)
 {
   for (uint32_t i = 0; i < nsMsgProcessingFlags::NumberOfFlags; i++)
     delete mProcessingFlag[i].keys;
 
   if (--mInstanceCount == 0) {
     NS_IF_RELEASE(gCollationKeyGenerator);
-    NS_Free(kLocalizedInboxName);
-    NS_Free(kLocalizedTrashName);
-    NS_Free(kLocalizedSentName);
-    NS_Free(kLocalizedDraftsName);
-    NS_Free(kLocalizedTemplatesName);
-    NS_Free(kLocalizedUnsentName);
-    NS_Free(kLocalizedJunkName);
-    NS_Free(kLocalizedArchivesName);
-    NS_Free(kLocalizedBrandShortName);
 
 #define MSGDBFOLDER_ATOM(name_, value_) NS_RELEASE(name_);
 #include "nsMsgDBFolderAtomList.h"
 #undef MSGDBFOLDER_ATOM
   }
   //shutdown but don't shutdown children.
   Shutdown(false);
 }
@@ -1916,26 +1907,26 @@ nsresult nsMsgDBFolder::HandleAutoCompac
           NS_ENSURE_SUCCESS(rv, rv);
           nsString dialogTitle;
           nsString confirmString;
           nsString checkboxText;
           nsString buttonCompactNowText;
           nsAutoString compactSize;
           FormatFileSize(totalExpungedBytes, true, compactSize);
           const char16_t* params[] = { compactSize.get() };
-          rv = bundle->GetStringFromName("autoCompactAllFoldersTitle", getter_Copies(dialogTitle));
+          rv = bundle->GetStringFromName("autoCompactAllFoldersTitle", dialogTitle);
           NS_ENSURE_SUCCESS(rv, rv);
           rv = bundle->FormatStringFromName("autoCompactAllFoldersText",
-                                            params, 1, getter_Copies(confirmString));
+                                            params, 1, confirmString);
           NS_ENSURE_SUCCESS(rv, rv);
           rv = bundle->GetStringFromName("autoCompactAlwaysAskCheckbox",
-                                         getter_Copies(checkboxText));
+                                         checkboxText);
           NS_ENSURE_SUCCESS(rv, rv);
           rv = bundle->GetStringFromName("compactNowButton",
-                                         getter_Copies(buttonCompactNowText));
+                                         buttonCompactNowText);
           NS_ENSURE_SUCCESS(rv, rv);
           bool alwaysAsk = true; // "Always ask..." - checked by default.
           int32_t buttonPressed = 0;
 
           nsCOMPtr<nsIPrompt> dialog;
           rv = aWindow->GetPromptDialog(getter_AddRefs(dialog));
           NS_ENSURE_SUCCESS(rv, rv);
 
@@ -2920,38 +2911,29 @@ nsMsgDBFolder::initializeStrings()
   nsCOMPtr<nsIStringBundleService> bundleService =
     mozilla::services::GetStringBundleService();
   NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
                                    getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  bundle->GetStringFromName("inboxFolderName",
-                            &kLocalizedInboxName);
-  bundle->GetStringFromName("trashFolderName",
-                            &kLocalizedTrashName);
-  bundle->GetStringFromName("sentFolderName",
-                            &kLocalizedSentName);
-  bundle->GetStringFromName("draftsFolderName",
-                            &kLocalizedDraftsName);
-  bundle->GetStringFromName("templatesFolderName",
-                            &kLocalizedTemplatesName);
-  bundle->GetStringFromName("junkFolderName",
-                            &kLocalizedJunkName);
-  bundle->GetStringFromName("outboxFolderName",
-                            &kLocalizedUnsentName);
-  bundle->GetStringFromName("archivesFolderName",
-                            &kLocalizedArchivesName);
+  bundle->GetStringFromName("inboxFolderName", kLocalizedInboxName);
+  bundle->GetStringFromName("trashFolderName", kLocalizedTrashName);
+  bundle->GetStringFromName("sentFolderName", kLocalizedSentName);
+  bundle->GetStringFromName("draftsFolderName", kLocalizedDraftsName);
+  bundle->GetStringFromName("templatesFolderName", kLocalizedTemplatesName);
+  bundle->GetStringFromName("junkFolderName", kLocalizedJunkName);
+  bundle->GetStringFromName("outboxFolderName", kLocalizedUnsentName);
+  bundle->GetStringFromName("archivesFolderName", kLocalizedArchivesName);
 
   nsCOMPtr<nsIStringBundle> brandBundle;
   rv = bundleService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
-  bundle->GetStringFromName("brandShortName",
-                            &kLocalizedBrandShortName);
+  bundle->GetStringFromName("brandShortName", kLocalizedBrandShortName);
   return NS_OK;
 }
 
 nsresult
 nsMsgDBFolder::createCollationKeyGenerator()
 {
   nsresult rv = NS_OK;
 
@@ -3399,31 +3381,31 @@ NS_IMETHODIMP nsMsgDBFolder::GetPrettyNa
 }
 
 NS_IMETHODIMP nsMsgDBFolder::SetPrettyName(const nsAString& name)
 {
   nsresult rv;
 
   //Set pretty name only if special flag is set and if it the default folder name
   if (mFlags & nsMsgFolderFlags::Inbox && name.LowerCaseEqualsLiteral("inbox"))
-    rv = SetName(nsDependentString(kLocalizedInboxName));
+    rv = SetName(kLocalizedInboxName);
   else if (mFlags & nsMsgFolderFlags::SentMail && name.LowerCaseEqualsLiteral("sent"))
-    rv = SetName(nsDependentString(kLocalizedSentName));
+    rv = SetName(kLocalizedSentName);
   else if (mFlags & nsMsgFolderFlags::Drafts && name.LowerCaseEqualsLiteral("drafts"))
-    rv = SetName(nsDependentString(kLocalizedDraftsName));
+    rv = SetName(kLocalizedDraftsName);
   else if (mFlags & nsMsgFolderFlags::Templates && name.LowerCaseEqualsLiteral("templates"))
-    rv = SetName(nsDependentString(kLocalizedTemplatesName));
+    rv = SetName(kLocalizedTemplatesName);
   else if (mFlags & nsMsgFolderFlags::Trash && name.LowerCaseEqualsLiteral("trash"))
-    rv = SetName(nsDependentString(kLocalizedTrashName));
+    rv = SetName(kLocalizedTrashName);
   else if (mFlags & nsMsgFolderFlags::Queue && name.LowerCaseEqualsLiteral("unsent messages"))
-    rv = SetName(nsDependentString(kLocalizedUnsentName));
+    rv = SetName(kLocalizedUnsentName);
   else if (mFlags & nsMsgFolderFlags::Junk && name.LowerCaseEqualsLiteral("junk"))
-    rv = SetName(nsDependentString(kLocalizedJunkName));
+    rv = SetName(kLocalizedJunkName);
   else if (mFlags & nsMsgFolderFlags::Archive && name.LowerCaseEqualsLiteral("archives"))
-    rv = SetName(nsDependentString(kLocalizedArchivesName));
+    rv = SetName(kLocalizedArchivesName);
   else
     rv = SetName(name);
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetName(nsAString& name)
 {
   nsresult rv;
@@ -3851,17 +3833,17 @@ nsMsgDBFolder::ConfirmAutoFolderRename(n
   {
     aOldName.get(),
     folderName.get(),
     aNewName.get()
   };
 
   nsString confirmString;
   rv = bundle->FormatStringFromName("confirmDuplicateFolderRename",
-                                    formatStrings, 3, getter_Copies(confirmString));
+                                    formatStrings, 3, confirmString);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return false;
   }
 
   bool confirmed = false;
   rv = ThrowConfirmationPrompt(msgWindow, confirmString, &confirmed);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return false;
@@ -5198,17 +5180,17 @@ nsMsgDBFolder::GetBaseStringBundle(nsISt
 
 nsresult //Do not use this routine if you have to call it very often because it creates a new bundle each time
 nsMsgDBFolder::GetStringFromBundle(const char *msgName, nsString& aResult)
 {
   nsresult rv;
   nsCOMPtr <nsIStringBundle> bundle;
   rv = GetBaseStringBundle(getter_AddRefs(bundle));
   if (NS_SUCCEEDED(rv) && bundle)
-    rv = bundle->GetStringFromName(msgName, getter_Copies(aResult));
+    rv = bundle->GetStringFromName(msgName, aResult);
   return rv;
 }
 
 nsresult
 nsMsgDBFolder::ThrowConfirmationPrompt(nsIMsgWindow *msgWindow, const nsAString& confirmString, bool *confirmed)
 {
   if (msgWindow)
   {
@@ -5231,22 +5213,22 @@ nsMsgDBFolder::GetStringWithFolderNameFr
   nsresult rv = GetBaseStringBundle(getter_AddRefs(bundle));
   if (NS_SUCCEEDED(rv) && bundle)
   {
     nsString folderName;
     GetName(folderName);
     const char16_t *formatStrings[] =
     {
       folderName.get(),
-      kLocalizedBrandShortName
+      kLocalizedBrandShortName.get()
     };
 
     nsString resultStr;
     rv = bundle->FormatStringFromName(msgName,
-                                      formatStrings, 2, getter_Copies(resultStr));
+                                      formatStrings, 2, resultStr);
     if (NS_SUCCEEDED(rv))
       aResult.Assign(resultStr);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::ConfirmFolderDeletionForFilter(nsIMsgWindow *msgWindow, bool *confirmed)
 {
--- a/mailnews/base/util/nsMsgDBFolder.h
+++ b/mailnews/base/util/nsMsgDBFolder.h
@@ -222,26 +222,26 @@ protected:
   bool mInVFEditSearchScope ; // non persistant state used by the virtual folder UI
 
   // static stuff for cross-instance objects like atoms
   static NS_MSG_BASE_STATIC_MEMBER_(nsrefcnt) gInstanceCount;
 
   static nsresult initializeStrings();
   static nsresult createCollationKeyGenerator();
 
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedInboxName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedTrashName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedSentName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedDraftsName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedTemplatesName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedUnsentName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedJunkName;
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedArchivesName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedInboxName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedTrashName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedSentName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedDraftsName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedTemplatesName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedUnsentName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedJunkName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedArchivesName;
 
-  static NS_MSG_BASE_STATIC_MEMBER_(char16_t*) kLocalizedBrandShortName;
+  static NS_MSG_BASE_STATIC_MEMBER_(nsString) kLocalizedBrandShortName;
   
 #define MSGDBFOLDER_ATOM(name_, value) static NS_MSG_BASE_STATIC_MEMBER_(nsIAtom*) name_;
 #include "nsMsgDBFolderAtomList.h"
 #undef MSGDBFOLDER_ATOM
 
   static NS_MSG_BASE_STATIC_MEMBER_(nsICollation*) gCollationKeyGenerator;
 
   // store of keys that have a processing flag set
--- a/mailnews/base/util/nsMsgIncomingServer.cpp
+++ b/mailnews/base/util/nsMsgIncomingServer.cpp
@@ -1637,18 +1637,18 @@ NS_IMETHODIMP nsMsgIncomingServer::Displ
 
   nsCOMPtr<nsIStringBundle> bundle;
   nsresult rv = bundleService->CreateBundle(BASE_MSGS_URL, getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
   if (bundle)
   {
     nsString errorMsgTitle;
     nsString errorMsgBody;
-    bundle->GetStringFromName("nocachedbodybody2", getter_Copies(errorMsgBody));
-    bundle->GetStringFromName("nocachedbodytitle", getter_Copies(errorMsgTitle));
+    bundle->GetStringFromName("nocachedbodybody2", errorMsgBody);
+    bundle->GetStringFromName("nocachedbodytitle", errorMsgTitle);
     aMsgWindow->DisplayHTMLInMessagePane(errorMsgTitle, errorMsgBody, true);
   }
 
   return NS_OK;
 }
 
 // Called only during the migration process. A unique name is generated for the
 // migrated account.
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -1535,26 +1535,26 @@ char16_t *FormatStringWithHostNameByName
   nsCOMPtr<nsIStringBundleService> sBundleService =
     mozilla::services::GetStringBundleService();
   NS_ENSURE_TRUE(sBundleService, nullptr);
 
   nsCOMPtr<nsIStringBundle> sBundle;
   rv = sBundleService->CreateBundle(MSGS_URL, getter_AddRefs(sBundle));
   NS_ENSURE_SUCCESS(rv, nullptr);
 
-  char16_t *ptrv = nullptr;
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = msgUri->GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, nullptr);
 
   nsCString hostName;
   rv = server->GetRealHostName(hostName);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
   NS_ConvertASCIItoUTF16 hostStr(hostName);
   const char16_t *params[] = { hostStr.get() };
-  rv = sBundle->FormatStringFromName(NS_ConvertUTF16toUTF8(stringName).get(), params, 1, &ptrv);
+  nsAutoString str;
+  rv = sBundle->FormatStringFromName(NS_ConvertUTF16toUTF8(stringName).get(), params, 1, str);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
-  return ptrv;
+  return ToNewUnicode(str);
 }
 
 // vim: ts=2 sw=2
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -512,18 +512,17 @@ nsresult FormatFileSize(int64_t size, bo
   while ((unitSize >= 999.5) && (unitIndex < ArrayLength(sizeAbbrNames) - 1))
   {
       unitSize /= 1024;
       unitIndex++;
   }
 
   // Grab the string for the appropriate unit
   nsString sizeAbbr;
-  rv = bundle->GetStringFromName(sizeAbbrNames[unitIndex],
-                                 getter_Copies(sizeAbbr));
+  rv = bundle->GetStringFromName(sizeAbbrNames[unitIndex], sizeAbbr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get rid of insignificant bits by truncating to 1 or 0 decimal points
   // 0.1 -> 0.1; 1.2 -> 1.2; 12.3 -> 12.3; 123.4 -> 123; 234.5 -> 235
   nsTextFormatter::ssprintf(
     formattedSize, sizeAbbr.get(),
     (unitIndex != 0) && (unitSize < 99.95 && unitSize != 0) ? 1 : 0, unitSize);
 
@@ -1760,42 +1759,42 @@ NS_MSG_BASE nsresult MsgPromptLoginFaile
 
   nsString message;
   NS_ConvertUTF8toUTF16 hostNameUTF16(aHostname);
   NS_ConvertUTF8toUTF16 userNameUTF16(aUsername);
   const char16_t *formatStrings[] = { hostNameUTF16.get(), userNameUTF16.get() };
 
   rv = bundle->FormatStringFromName("mailServerLoginFailed2",
                                     formatStrings, 2,
-                                    getter_Copies(message));
+                                    message);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString title;
   if (aAccountname.IsEmpty()) {
     // Account name may be empty e.g. on a SMTP server.
     rv = bundle->GetStringFromName(
-      "mailServerLoginFailedTitle", getter_Copies(title));
+      "mailServerLoginFailedTitle", title);
   } else {
     const char16_t *formatStrings[] = { aAccountname.BeginReading() };
     rv = bundle->FormatStringFromName(
       "mailServerLoginFailedTitleWithAccount",
-      formatStrings, 1, getter_Copies(title));
+      formatStrings, 1, title);
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString button0;
   rv = bundle->GetStringFromName(
     "mailServerLoginFailedRetryButton",
-    getter_Copies(button0));
+    button0);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString button2;
   rv = bundle->GetStringFromName(
     "mailServerLoginFailedEnterNewPasswordButton",
-    getter_Copies(button2));
+    button2);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool dummyValue = false;
   return dialog->ConfirmEx(
     title.get(), message.get(),
     (nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) +
     (nsIPrompt::BUTTON_TITLE_CANCEL * nsIPrompt::BUTTON_POS_1) +
     (nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_2),
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -1161,20 +1161,20 @@ nsMsgAttachmentHandler::UrlExit(nsresult
     }
     else
       params.AssignLiteral("?");
 
     NS_ConvertUTF8toUTF16 UTF16params(params);
     const char16_t* formatParams[] = { UTF16params.get() };
     if (mode == nsIMsgSend::nsMsgSaveAsDraft || mode == nsIMsgSend::nsMsgSaveAsTemplate)
       bundle->FormatStringFromName("failureOnObjectEmbeddingWhileSaving",
-                                   formatParams, 1, getter_Copies(msg));
+                                   formatParams, 1, msg);
     else
       bundle->FormatStringFromName("failureOnObjectEmbeddingWhileSending",
-                                   formatParams, 1, getter_Copies(msg));
+                                   formatParams, 1, msg);
 
     nsCOMPtr<nsIPrompt> aPrompt;
     if (m_mime_delivery_state)
       m_mime_delivery_state->GetDefaultPrompt(getter_AddRefs(aPrompt));
     nsMsgAskBooleanQuestionByString(aPrompt, msg.get(), &keepOnGoing);
 
     if (keepOnGoing)
     {
--- a/mailnews/compose/src/nsMsgCompUtils.cpp
+++ b/mailnews/compose/src/nsMsgCompUtils.cpp
@@ -435,17 +435,17 @@ nsresult mime_generate_headers(nsIMsgCom
         if (stringService)
         {
           nsCOMPtr<nsIStringBundle> composeStringBundle;
           rv = stringService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(composeStringBundle));
           if (NS_SUCCEEDED(rv))
           {
             nsString undisclosedRecipients;
             rv = composeStringBundle->GetStringFromName("undisclosedRecipients",
-                                                        getter_Copies(undisclosedRecipients));
+                                                        undisclosedRecipients);
             if (NS_SUCCEEDED(rv) && !undisclosedRecipients.IsEmpty())
             {
               nsCOMPtr<nsIMsgHeaderParser> headerParser(
                 mozilla::services::GetHeaderParser());
               nsCOMPtr<msgIAddressObject> group;
               headerParser->MakeGroupObject(undisclosedRecipients,
                 nullptr, 0, getter_AddRefs(group));
               recipients.AppendElement(group);
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -2184,17 +2184,17 @@ nsresult nsMsgCompose::CreateMessage(con
                 nsCOMPtr<nsIStringBundleService> bundleService =
                   mozilla::services::GetStringBundleService();
                 NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
                 nsCOMPtr<nsIStringBundle> composeBundle;
                 rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties",
                                                  getter_AddRefs(composeBundle));
                 NS_ENSURE_SUCCESS(rv, rv);
                 composeBundle->GetStringFromName("messageAttachmentSafeName",
-                                                 getter_Copies(sanitizedSubj));
+                                                 sanitizedSubj);
               }
               else
                 sanitizedSubj.Assign(subject);
 
               // set the file size
               uint32_t messageSize;
               msgHdr->GetMessageSize(&messageSize);
               attachment->SetSize(messageSize);
@@ -4057,17 +4057,17 @@ NS_IMETHODIMP nsMsgComposeSendListener::
             mozilla::services::GetStringBundleService();
           NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
           nsCOMPtr<nsIStringBundle> bundle;
           rv = bundleService->CreateBundle(
             "chrome://messenger/locale/messengercompose/composeMsgs.properties",
             getter_AddRefs(bundle));
           NS_ENSURE_SUCCESS(rv, rv);
           nsString msg;
-          bundle->GetStringFromName("msgCancelling", getter_Copies(msg));
+          bundle->GetStringFromName("msgCancelling", msg);
           progress->OnStatusChange(nullptr, nullptr, NS_OK, msg.get());
         }
       }
 
       nsCOMPtr<nsIMsgSend> msgSend;
       msgCompose->GetMessageSend(getter_AddRefs(msgSend));
       if (msgSend)
         msgSend->Abort();
--- a/mailnews/compose/src/nsMsgPrompts.cpp
+++ b/mailnews/compose/src/nsMsgPrompts.cpp
@@ -23,17 +23,17 @@ nsMsgGetMessageByName(const char* aName,
   NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle(
     "chrome://messenger/locale/messengercompose/composeMsgs.properties",
     getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return bundle->GetStringFromName(aName, getter_Copies(aResult));
+  return bundle->GetStringFromName(aName, aResult);
 }
 
 static nsresult
 nsMsgBuildMessageByName(const char *aName, nsIFile *aFile, nsString& aResult)
 {
   NS_ENSURE_ARG_POINTER(aFile);
   nsresult rv;
   nsCOMPtr<nsIStringBundleService> bundleService =
@@ -43,17 +43,17 @@ nsMsgBuildMessageByName(const char *aNam
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString path;
   aFile->GetPath(path);
 
   const char16_t *params[1] = {path.get()};
-  return bundle->FormatStringFromName(aName, params, 1, getter_Copies(aResult));
+  return bundle->FormatStringFromName(aName, params, 1, aResult);
 }
 
 nsresult
 nsMsgBuildMessageWithFile(nsIFile *aFile, nsString& aResult)
 {
   return nsMsgBuildMessageByName("unableToOpenFile", aFile, aResult);
 }
 
--- a/mailnews/compose/src/nsMsgSend.cpp
+++ b/mailnews/compose/src/nsMsgSend.cpp
@@ -559,18 +559,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
 
   /* Kludge to avoid having to allocate memory on the toy computers... */
   buffer = mime_get_stream_write_buffer();
   if (! buffer)
     goto FAILMEM;
 
   NS_ASSERTION (m_attachment_pending_count == 0, "m_attachment_pending_count != 0");
 
-  mComposeBundle->GetStringFromName("assemblingMessage",
-                                    getter_Copies(msg));
+  mComposeBundle->GetStringFromName("assemblingMessage", msg);
   SetStatusMessage( msg );
 
   /* First, open the message file.
   */
   rv = nsMsgCreateTempFile("nsemail.eml", getter_AddRefs(mTempFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(mOutputFile), mTempFile, -1, 00600);
@@ -926,18 +925,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
         if (m_attachments[i]->mMHTMLPart)
           PreProcessPart(m_attachments[i], m_related_part);
       }
     }
 
   }
 
   // Tell the user we are creating the message...
-  mComposeBundle->GetStringFromName("creatingMailMessage",
-                                    getter_Copies(msg));
+  mComposeBundle->GetStringFromName("creatingMailMessage", msg);
   SetStatusMessage( msg );
 
   // OK, now actually write the structure we've carefully built up.
   status = toppart->Write();
   if (NS_FAILED(status))
     goto FAIL;
 
   /* Close down encryption stream */
@@ -969,18 +967,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
     rv = mTempFile->GetFileSize(&fileSize);
     if (NS_FAILED(rv) || fileSize == 0)
     {
       status = NS_MSG_ERROR_WRITING_FILE;
       goto FAIL;
     }
   }
 
-  mComposeBundle->GetStringFromName("assemblingMessageDone",
-                                    getter_Copies(msg));
+  mComposeBundle->GetStringFromName("assemblingMessageDone", msg);
   SetStatusMessage(msg);
 
   if (m_dont_deliver_p && mListener)
   {
     //
     // Need to ditch the file spec here so that we don't delete the
     // file, since in this case, the caller wants the file
     //
@@ -2518,17 +2515,17 @@ nsMsgComposeAndSend::HackAttachments(nsI
         formatParams[0] = params.get();
       } else if (m_attachments[i]->mURL) {
         nsCString asciiSpec;
         m_attachments[i]->mURL->GetAsciiSpec(asciiSpec);
         attachmentFileName.AssignASCII(asciiSpec.get());
         formatParams[0] = attachmentFileName.get();
       }
       mComposeBundle->FormatStringFromName("gatheringAttachment",
-                                           formatParams, 1, getter_Copies(msg));
+                                           formatParams, 1, msg);
 
       if (!msg.IsEmpty())
       {
         SetStatusMessage(msg);
       }
 
       /* As SnarfAttachment will call GatherMimeAttachments when it will be done (this is an async process),
          we need to avoid to call it ourself.
@@ -2547,17 +2544,17 @@ nsMsgComposeAndSend::HackAttachments(nsI
           rv = NS_OK;
         }
         if (NS_SUCCEEDED(rv))
         {
           nsCOMPtr<nsIStringBundle> bundle;
           const char16_t *params[] = { attachmentFileName.get() };
           mComposeBundle->FormatStringFromName("errorAttachingFile",
                                                params, 1,
-                                               getter_Copies(errorMsg));
+                                               errorMsg);
           mSendReport->SetMessage(nsIMsgSendReport::process_Current, errorMsg.get(), false);
           mSendReport->SetError(nsIMsgSendReport::process_Current,
                                 NS_MSG_ERROR_ATTACHING_FILE,
                                 false);
         }
         return NS_MSG_ERROR_ATTACHING_FILE;
       }
       if (m_be_synchronous_p)
@@ -3037,17 +3034,17 @@ nsMsgComposeAndSend::Init(
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(mComposeBundle));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // Tell the user we are assembling the message...
-  mComposeBundle->GetStringFromName("assemblingMailInformation", getter_Copies(msg));
+  mComposeBundle->GetStringFromName("assemblingMailInformation", msg);
   SetStatusMessage(msg);
   if (mSendReport)
     mSendReport->SetCurrentProcess(nsIMsgSendReport::process_BuildMessage);
 
   //
   // The Init() method should initialize a send operation for full
   // blown create and send operations as well as just the "send a file"
   // operations.
@@ -3241,17 +3238,17 @@ nsMsgComposeAndSend::DeliverMessage()
   if ((mMessageWarningSize > 0) && (fileSize > mMessageWarningSize) && (mGUINotificationEnabled))
   {
     bool abortTheSend = false;
     nsString msg;
     nsAutoString formattedFileSize;
     FormatFileSize(fileSize, true, formattedFileSize);
     const char16_t* params[] = { formattedFileSize.get() };
     mComposeBundle->FormatStringFromName("largeMessageSendWarning",
-                                         params, 1, getter_Copies(msg));
+                                         params, 1, msg);
 
     if (!msg.IsEmpty())
     {
       nsCOMPtr<nsIPrompt> prompt;
       GetDefaultPrompt(getter_AddRefs(prompt));
       nsMsgAskBooleanQuestionByString(prompt, msg.get(), &abortTheSend);
       if (!abortTheSend)
       {
@@ -3399,17 +3396,17 @@ nsMsgComposeAndSend::DeliverFileAsMail()
     // to the top most mail window...after all, that's where we are going to be sending status
     // update information too....
 
     nsCOMPtr<nsIInterfaceRequestor> callbacks;
     GetNotificationCallbacks(getter_AddRefs(callbacks));
 
     // Tell the user we are sending the message!
     nsString msg;
-    mComposeBundle->GetStringFromName("sendingMessage", getter_Copies(msg));
+    mComposeBundle->GetStringFromName("sendingMessage", msg);
     SetStatusMessage(msg);
     nsCOMPtr<nsIMsgStatusFeedback> msgStatus (do_QueryInterface(mSendProgress));
     // if the sendProgress isn't set, let's use the member variable.
     if (!msgStatus)
       msgStatus = do_QueryInterface(mStatusFeedback);
 
     nsCOMPtr<nsIURI> runningUrl;
     rv = smtpService->SendMailMessage(mTempFile, buf, mUserIdentity,
@@ -3448,18 +3445,17 @@ nsMsgComposeAndSend::DeliverFileAsNews()
   if (NS_SUCCEEDED(rv) && nntpService)
   {
     MsgDeliveryListener *deliveryListener = new MsgDeliveryListener(this, true);
     if (!deliveryListener)
       return NS_ERROR_OUT_OF_MEMORY;
 
     // Tell the user we are posting the message!
     nsString msg;
-    mComposeBundle->GetStringFromName("postingMessage",
-                                      getter_Copies(msg));
+    mComposeBundle->GetStringFromName("postingMessage", msg);
     SetStatusMessage(msg);
 
     nsCOMPtr <nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // JFD TODO: we should use GetDefaultPrompt instead
     nsCOMPtr<nsIMsgWindow> msgWindow;
     rv = mailSession->GetTopmostMsgWindow(getter_AddRefs(msgWindow));
@@ -3512,20 +3508,18 @@ nsMsgComposeAndSend::Fail(nsresult aFail
 
   //Stop any pending process...
   Abort();
 
   return NS_OK;
 }
 
 nsresult
-nsMsgComposeAndSend::FormatStringWithSMTPHostNameByName(const char* aMsgName, char16_t **aString)
+nsMsgComposeAndSend::FormatStringWithSMTPHostNameByName(const char* aMsgName, nsAString& aString)
 {
-  NS_ENSURE_ARG(aString);
-
   nsresult rv;
   nsCOMPtr<nsISmtpService> smtpService(do_GetService(NS_SMTPSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv,rv);
 
   // Get the smtp hostname and format the string.
   nsCString smtpHostName;
   nsCOMPtr<nsISmtpServer> smtpServer;
   rv = smtpService->GetServerByIdentity(mUserIdentity, getter_AddRefs(smtpServer));
@@ -3558,19 +3552,19 @@ nsMsgComposeAndSend::DoDeliveryExitProce
         aExitCode == NS_ERROR_SMTP_AUTH_FAILURE ||
         aExitCode == NS_ERROR_SMTP_AUTH_GSSAPI ||
         aExitCode == NS_ERROR_SMTP_AUTH_MECH_NOT_SUPPORTED ||
         aExitCode == NS_ERROR_SMTP_AUTH_NOT_SUPPORTED ||
         aExitCode == NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_NO_SSL ||
         aExitCode == NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_SSL ||
         aExitCode == NS_ERROR_SMTP_AUTH_CHANGE_PLAIN_TO_ENCRYPT ||
         aExitCode == NS_ERROR_STARTTLS_FAILED_EHLO_STARTTLS) {
-      FormatStringWithSMTPHostNameByName(exitString, getter_Copies(eMsg));
+      FormatStringWithSMTPHostNameByName(exitString, eMsg);
     } else {
-      mComposeBundle->GetStringFromName(exitString, getter_Copies(eMsg));
+      mComposeBundle->GetStringFromName(exitString, eMsg);
     }
 
     Fail(aExitCode, eMsg.get(), &aExitCode);
     NotifyListenerOnStopSending(nullptr, aExitCode, nullptr, nullptr);
     return;
   }
 
   if (aCheckForMail)
@@ -3827,19 +3821,19 @@ NS_IMETHODIMP
 nsMsgComposeAndSend::NotifyListenerOnStopCopy(nsresult aStatus)
 {
   // This is one per copy so make sure we clean this up first.
   mCopyObj = nullptr;
 
   // Set a status message...
   nsString msg;
   if (NS_SUCCEEDED(aStatus))
-    mComposeBundle->GetStringFromName("copyMessageComplete", getter_Copies(msg));
+    mComposeBundle->GetStringFromName("copyMessageComplete", msg);
   else
-    mComposeBundle->GetStringFromName("copyMessageFailed", getter_Copies(msg));
+    mComposeBundle->GetStringFromName("copyMessageFailed", msg);
 
   SetStatusMessage(msg);
   nsCOMPtr<nsIPrompt> prompt;
   GetDefaultPrompt(getter_AddRefs(prompt));
 
   if (NS_FAILED(aStatus))
   {
     nsresult rv;
@@ -3892,40 +3886,40 @@ nsMsgComposeAndSend::NotifyListenerOnSto
 
     nsString msg;
     switch (m_deliver_mode)
     {
       case nsMsgDeliverNow:
       case nsMsgSendUnsent:
         rv = bundle->FormatStringFromName("promptToSaveSentLocally",
                                           formatStrings, 3,
-                                          getter_Copies(msg));
+                                          msg);
         break;
       case nsMsgSaveAsDraft:
         rv = bundle->FormatStringFromName("promptToSaveDraftLocally",
                                           formatStrings, 3,
-                                          getter_Copies(msg));
+                                          msg);
         break;
       case nsMsgSaveAsTemplate:
         rv = bundle->FormatStringFromName("promptToSaveTemplateLocally",
                                           formatStrings, 3,
-                                          getter_Copies(msg));
+                                          msg);
         break;
       default:
         rv = NS_ERROR_UNEXPECTED;
     }
     NS_ENSURE_SUCCESS(rv, rv);
     int32_t buttonPressed = 0;
     bool showCheckBox = false;
     uint32_t buttonFlags = (nsIPrompt::BUTTON_POS_0 * nsIPrompt::BUTTON_TITLE_IS_STRING) +
                            (nsIPrompt::BUTTON_POS_1 * nsIPrompt::BUTTON_TITLE_CANCEL) +
                            (nsIPrompt::BUTTON_POS_2 * nsIPrompt::BUTTON_TITLE_SAVE);
     nsString dialogTitle, buttonLabelRetry;
-    bundle->GetStringFromName("SaveDialogTitle", getter_Copies(dialogTitle));
-    bundle->GetStringFromName("buttonLabelRetry", getter_Copies(buttonLabelRetry));
+    bundle->GetStringFromName("SaveDialogTitle", dialogTitle);
+    bundle->GetStringFromName("buttonLabelRetry", buttonLabelRetry);
     prompt->ConfirmEx(dialogTitle.get(), msg.get(), buttonFlags, buttonLabelRetry.get(),
                       nullptr, nullptr, nullptr, &showCheckBox, &buttonPressed);
     if (buttonPressed == 0)
     {
       // retry button clicked
       mSendProgress = nullptr; // this was canceled, so we need to clear it.
       return SendToMagicFolder(m_deliver_mode);
     }
@@ -4009,25 +4003,25 @@ nsMsgComposeAndSend::FilterSentMessage()
 }
 
 NS_IMETHODIMP
 nsMsgComposeAndSend::OnStopOperation(nsresult aStatus)
 {
   // Set a status message...
   nsString msg;
   if (NS_SUCCEEDED(aStatus))
-    mComposeBundle->GetStringFromName("filterMessageComplete", getter_Copies(msg));
+    mComposeBundle->GetStringFromName("filterMessageComplete", msg);
   else
-    mComposeBundle->GetStringFromName("filterMessageFailed", getter_Copies(msg));
+    mComposeBundle->GetStringFromName("filterMessageFailed", msg);
 
   SetStatusMessage(msg);
 
   if (NS_FAILED(aStatus))
   {
-    nsresult rv = mComposeBundle->GetStringFromName("errorFilteringMsg", getter_Copies(msg));
+    nsresult rv = mComposeBundle->GetStringFromName("errorFilteringMsg", msg);
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIPrompt> prompt;
       GetDefaultPrompt(getter_AddRefs(prompt));
       nsMsgDisplayMessageByString(prompt, msg.get(), nullptr);
     }
 
     // We failed, however, give Fail a success code so that it doesn't prompt
@@ -4476,18 +4470,17 @@ nsMsgComposeAndSend::MimeDoFCC(nsIFile  
   {
     GetFolderURIFromUserPrefs(mode, mUserIdentity, tmpUri);
   }
   status = MessageFolderIsLocal(mUserIdentity, mode, tmpUri.get(), &folderIsLocal);
   if (NS_FAILED(status))
     goto FAIL;
 
   // Tell the user we are copying the message...
-  mComposeBundle->GetStringFromName("copyMessageStart",
-                                    getter_Copies(msg));
+  mComposeBundle->GetStringFromName("copyMessageStart", msg);
   if (!msg.IsEmpty())
   {
     nsCOMPtr<nsIRDFService> rdfService = do_GetService(kRDFServiceCID);
     if (rdfService)
     {
       nsCOMPtr<nsIRDFResource> res;
       rdfService->GetResource(tmpUri, getter_AddRefs(res));
       nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(res);
--- a/mailnews/compose/src/nsMsgSend.h
+++ b/mailnews/compose/src/nsMsgSend.h
@@ -184,17 +184,17 @@ public:
   nsMsgComposeAndSend();
 
 
   // Delivery and completion callback routines...
   NS_IMETHOD  DeliverMessage();
   NS_IMETHOD  DeliverFileAsMail();
   NS_IMETHOD  DeliverFileAsNews();
   void        DoDeliveryExitProcessing(nsIURI * aUrl, nsresult aExitCode, bool aCheckForMail);
-  nsresult    FormatStringWithSMTPHostNameByName(const char* aMsgName, char16_t **aString);
+  nsresult    FormatStringWithSMTPHostNameByName(const char* aMsgName, nsAString& aString);
 
   nsresult    DoFcc();
   nsresult    StartMessageCopyOperation(nsIFile          *aFileSpec,
                                         nsMsgDeliverMode mode,
                                         const nsCString& dest_uri);
 
 
   nsresult SendToMagicFolder(nsMsgDeliverMode flag);
--- a/mailnews/compose/src/nsMsgSendReport.cpp
+++ b/mailnews/compose/src/nsMsgSendReport.cpp
@@ -305,18 +305,17 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
     // SMTP is taking care of it's own error message and will return NS_ERROR_BUT_DONT_SHOW_ALERT as error code.
     // In that case, we must not show an alert ourself.
     if (currError == NS_ERROR_BUT_DONT_SHOW_ALERT)
     {
       mAlreadyDisplayReport = true;
       return NS_OK;
     }
 
-    bundle->GetStringFromName("sendMessageErrorTitle",
-                              getter_Copies(dialogTitle));
+    bundle->GetStringFromName("sendMessageErrorTitle", dialogTitle);
 
     const char* preStrName = "sendFailed";
     bool askToGoBackToCompose = false;
     switch (mCurrentProcess)
     {
       case process_BuildMessage :
         preStrName = "sendFailed";
         askToGoBackToCompose = false;
@@ -338,24 +337,23 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
         preStrName = "failedCopyOperation";
         askToGoBackToCompose = (mDeliveryMode == nsIMsgCompDeliverMode::Now);
         break;
       case process_FCC:
         preStrName = "failedCopyOperation";
         askToGoBackToCompose = (mDeliveryMode == nsIMsgCompDeliverMode::Now);
         break;
     }
-    bundle->GetStringFromName(preStrName, getter_Copies(dialogMessage));
+    bundle->GetStringFromName(preStrName, dialogMessage);
 
     //Do we already have an error message?
     if (!askToGoBackToCompose && currMessage.IsEmpty())
     {
       //we don't have an error description but we can put a generic explanation
-      bundle->GetStringFromName("genericFailureExplanation",
-                                getter_Copies(currMessage));
+      bundle->GetStringFromName("genericFailureExplanation", currMessage);
     }
 
     if (!currMessage.IsEmpty())
     {
       //Don't need to repeat ourself!
       if (!currMessage.Equals(dialogMessage))
       {
         if (!dialogMessage.IsEmpty())
@@ -363,18 +361,17 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
         dialogMessage.Append(currMessage);
       }
     }
 
     if (askToGoBackToCompose)
     {
       bool oopsGiveMeBackTheComposeWindow = true;
       nsString text1;
-      bundle->GetStringFromName("returnToComposeWindowQuestion",
-                                getter_Copies(text1));
+      bundle->GetStringFromName("returnToComposeWindowQuestion", text1);
       if (!dialogMessage.IsEmpty())
         dialogMessage.AppendLiteral("\n");
       dialogMessage.Append(text1);
       nsMsgAskBooleanQuestionByString(prompt, dialogMessage.get(), &oopsGiveMeBackTheComposeWindow, dialogTitle.get());
       if (!oopsGiveMeBackTheComposeWindow)
         *_retval = NS_OK;
     }
     else
@@ -405,26 +402,24 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
 
       default:
         /* This should never happen! */
         title = "sendMessageErrorTitle";
         messageName = "sendFailed";
         break;
     }
 
-    bundle->GetStringFromName(title, getter_Copies(dialogTitle));
-    bundle->GetStringFromName(messageName,
-                              getter_Copies(dialogMessage));
+    bundle->GetStringFromName(title, dialogTitle);
+    bundle->GetStringFromName(messageName, dialogMessage);
 
     //Do we have an error message...
     if (currMessage.IsEmpty())
     {
       //we don't have an error description but we can put a generic explanation
-      bundle->GetStringFromName("genericFailureExplanation",
-                                getter_Copies(currMessage));
+      bundle->GetStringFromName("genericFailureExplanation", currMessage);
     }
 
     if (!currMessage.IsEmpty())
     {
       if (!dialogMessage.IsEmpty())
         dialogMessage.Append(char16_t('\n'));
       dialogMessage.Append(currMessage);
     }
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -98,37 +98,36 @@ nsresult nsExplainErrorDetails(nsISmtpUr
 #ifdef __GNUC__
 // Temporary workaroung until bug 783526 is fixed.
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wswitch"
 #endif
   switch (aCode)
   {
     case NS_ERROR_ILLEGAL_LOCALPART:
-      bundle->GetStringFromName("errorIllegalLocalPart",
-                                getter_Copies(eMsg));
+      bundle->GetStringFromName("errorIllegalLocalPart", eMsg);
       msg = nsTextFormatter::vsmprintf(eMsg.get(), args);
       break;
     case NS_ERROR_SMTP_SERVER_ERROR:
     case NS_ERROR_TCP_READ_ERROR:
     case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED:
     case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1:
     case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2:
     case NS_ERROR_SENDING_FROM_COMMAND:
     case NS_ERROR_SENDING_RCPT_COMMAND:
     case NS_ERROR_SENDING_DATA_COMMAND:
     case NS_ERROR_SENDING_MESSAGE:
     case NS_ERROR_SMTP_GREETING:
       exitString = errorStringNameForErrorCode(aCode);
-      bundle->GetStringFromName(exitString, getter_Copies(eMsg));
+      bundle->GetStringFromName(exitString, eMsg);
       msg = nsTextFormatter::vsmprintf(eMsg.get(), args);
       break;
     default:
       NS_WARNING("falling to default error code");
-      bundle->GetStringFromName("communicationsError", getter_Copies(eMsg));
+      bundle->GetStringFromName("communicationsError", eMsg);
       msg = nsTextFormatter::smprintf(eMsg.get(), aCode);
       break;
   }
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
 
   if (msg)
@@ -578,17 +577,17 @@ void nsSmtpProtocol::UpdateStatus(const 
   {
     nsCOMPtr<nsIStringBundleService> bundleService =
       mozilla::services::GetStringBundleService();
     if (!bundleService) return;
     nsCOMPtr<nsIStringBundle> bundle;
     nsresult rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(bundle));
     if (NS_FAILED(rv)) return;
     nsString msg;
-    bundle->GetStringFromName(aStatusName, getter_Copies(msg));
+    bundle->GetStringFromName(aStatusName, msg);
     UpdateStatusWithString(msg.get());
   }
 }
 
 void nsSmtpProtocol::UpdateStatusWithString(const char16_t * aStatusString)
 {
   if (m_statusFeedback && aStatusString)
     m_statusFeedback->ShowStatusString(nsDependentString(aStatusString));
@@ -2215,31 +2214,31 @@ nsSmtpProtocol::PromptForPassword(nsISmt
   nsCOMPtr<nsIStringBundle> composeStringBundle;
   nsresult rv = stringService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(composeStringBundle));
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsString passwordPromptString;
   if(formatStrings[1])
     rv = composeStringBundle->FormatStringFromName(
       "smtpEnterPasswordPromptWithUsername",
-      formatStrings, 2, getter_Copies(passwordPromptString));
+      formatStrings, 2, passwordPromptString);
   else
     rv = composeStringBundle->FormatStringFromName(
       "smtpEnterPasswordPrompt",
-      formatStrings, 1, getter_Copies(passwordPromptString));
+      formatStrings, 1, passwordPromptString);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAuthPrompt> netPrompt;
   rv = aSmtpUrl->GetAuthPrompt(getter_AddRefs(netPrompt));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString passwordTitle;
   rv = composeStringBundle->GetStringFromName(
     "smtpEnterPasswordPromptTitle",
-    getter_Copies(passwordTitle));
+    passwordTitle);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = aSmtpServer->GetPasswordWithUI(passwordPromptString.get(), passwordTitle.get(),
     netPrompt, aPassword);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
--- a/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
+++ b/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
@@ -68,28 +68,35 @@ NS_IMETHODIMP nsMsgMailView::GetPrettyNa
         bundleService->CreateBundle("chrome://messenger/locale/mailviews.properties",
                                     getter_AddRefs(mBundle));
     }
 
     NS_ENSURE_TRUE(mBundle, NS_ERROR_FAILURE);
 
     // see if mName has an associated pretty name inside our string bundle and if so, use that as the pretty name
     // otherwise just return mName
-    if (mName.EqualsLiteral(kDefaultViewPeopleIKnow))
-        rv = mBundle->GetStringFromName("mailViewPeopleIKnow", aMailViewName);
-    else if (mName.EqualsLiteral(kDefaultViewRecent))
-        rv = mBundle->GetStringFromName("mailViewRecentMail", aMailViewName);
-    else if (mName.EqualsLiteral(kDefaultViewFiveDays))
-        rv = mBundle->GetStringFromName("mailViewLastFiveDays", aMailViewName);
-    else if (mName.EqualsLiteral(kDefaultViewNotJunk))
-        rv = mBundle->GetStringFromName("mailViewNotJunk", aMailViewName);
-    else if (mName.EqualsLiteral(kDefaultViewHasAttachments))
-        rv = mBundle->GetStringFromName("mailViewHasAttachments", aMailViewName);
-    else
+    nsAutoString mailViewName;
+    if (mName.EqualsLiteral(kDefaultViewPeopleIKnow)) {
+        rv = mBundle->GetStringFromName("mailViewPeopleIKnow", mailViewName);
+        *aMailViewName = ToNewUnicode(mailViewName);
+    } else if (mName.EqualsLiteral(kDefaultViewRecent)) {
+        rv = mBundle->GetStringFromName("mailViewRecentMail", mailViewName);
+        *aMailViewName = ToNewUnicode(mailViewName);
+    } else if (mName.EqualsLiteral(kDefaultViewFiveDays)) {
+        rv = mBundle->GetStringFromName("mailViewLastFiveDays", mailViewName);
+        *aMailViewName = ToNewUnicode(mailViewName);
+    } else if (mName.EqualsLiteral(kDefaultViewNotJunk)) {
+        rv = mBundle->GetStringFromName("mailViewNotJunk", mailViewName);
+        *aMailViewName = ToNewUnicode(mailViewName);
+    } else if (mName.EqualsLiteral(kDefaultViewHasAttachments)) {
+        rv = mBundle->GetStringFromName("mailViewHasAttachments", mailViewName);
+        *aMailViewName = ToNewUnicode(mailViewName);
+    } else {
         *aMailViewName = ToNewUnicode(mName);
+    }
 
     return rv;
 }
 
 NS_IMETHODIMP nsMsgMailView::GetSearchTerms(nsIMutableArray **aSearchTerms)
 {
     NS_ENSURE_ARG_POINTER(aSearchTerms);
     NS_IF_ADDREF(*aSearchTerms = mViewSearchTerms);
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
@@ -96,17 +96,17 @@ nsMsgMdnGenerator::nsMsgMdnGenerator()
 }
 
 nsMsgMdnGenerator::~nsMsgMdnGenerator()
 {
 }
 
 nsresult nsMsgMdnGenerator::FormatStringFromName(const char *aName,
                                                  const char16_t *aString,
-                                                 char16_t **aResultString)
+                                                 nsAString& aResultString)
 {
     DEBUG_MDN("nsMsgMdnGenerator::FormatStringFromName");
 
     nsCOMPtr<nsIStringBundleService> bundleService =
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
     nsCOMPtr <nsIStringBundle> bundle;
@@ -117,17 +117,17 @@ nsresult nsMsgMdnGenerator::FormatString
     const char16_t *formatStrings[1] = { aString };
     rv = bundle->FormatStringFromName(aName,
                     formatStrings, 1, aResultString);
     NS_ENSURE_SUCCESS(rv,rv);
     return rv;
 }
 
 nsresult nsMsgMdnGenerator::GetStringFromName(const char *aName,
-                                               char16_t **aResultString)
+                                              nsAString& aResultString)
 {
     DEBUG_MDN("nsMsgMdnGenerator::GetStringFromName");
 
     nsCOMPtr<nsIStringBundleService> bundleService =
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
     nsCOMPtr <nsIStringBundle> bundle;
@@ -468,17 +468,17 @@ nsresult nsMsgMdnGenerator::CreateFirstP
     MakeMimeAddress(NS_ConvertUTF16toUTF8(fullName), m_email, fullAddress);
 
     convbuf = nsMsgI18NEncodeMimePartIIStr(fullAddress.get(),
         true, m_charset.get(), 0, conformToStandard);
 
     parm = PR_smprintf("From: %s" CRLF, convbuf ? convbuf : m_email.get());
 
     rv = FormatStringFromName("MsgMdnMsgSentTo", NS_ConvertASCIItoUTF16(m_email).get(),
-                            getter_Copies(firstPart1));
+                            firstPart1);
     if (NS_FAILED(rv))
         return rv;
 
     PUSH_N_FREE_STRING (parm);
 
     PR_Free(convbuf);
 
     if (compUtils)
@@ -490,42 +490,42 @@ nsresult nsMsgMdnGenerator::CreateFirstP
     }
 
     nsString receipt_string;
     switch (m_disposeType)
     {
     case nsIMsgMdnGenerator::eDisplayed:
         rv = GetStringFromName(
             "MdnDisplayedReceipt",
-            getter_Copies(receipt_string));
+            receipt_string);
         break;
     case nsIMsgMdnGenerator::eDispatched:
         rv = GetStringFromName(
             "MdnDispatchedReceipt",
-            getter_Copies(receipt_string));
+            receipt_string);
         break;
     case nsIMsgMdnGenerator::eProcessed:
         rv = GetStringFromName(
             "MdnProcessedReceipt",
-            getter_Copies(receipt_string));
+            receipt_string);
         break;
     case nsIMsgMdnGenerator::eDeleted:
         rv = GetStringFromName(
             "MdnDeletedReceipt",
-            getter_Copies(receipt_string));
+            receipt_string);
         break;
     case nsIMsgMdnGenerator::eDenied:
         rv = GetStringFromName(
             "MdnDeniedReceipt",
-            getter_Copies(receipt_string));
+            receipt_string);
         break;
     case nsIMsgMdnGenerator::eFailed:
         rv = GetStringFromName(
             "MdnFailedReceipt",
-            getter_Copies(receipt_string));
+            receipt_string);
         break;
     default:
         rv = NS_ERROR_INVALID_ARG;
         break;
     }
 
     if (NS_FAILED(rv))
         return rv;
@@ -591,42 +591,42 @@ report-type=disposition-notification;\r\
         PUSH_N_FREE_STRING(tmpBuffer);
     }
 
     switch (m_disposeType)
     {
     case nsIMsgMdnGenerator::eDisplayed:
         rv = GetStringFromName(
             "MsgMdnDisplayed",
-            getter_Copies(firstPart2));
+            firstPart2);
         break;
     case nsIMsgMdnGenerator::eDispatched:
         rv = GetStringFromName(
             "MsgMdnDispatched",
-            getter_Copies(firstPart2));
+            firstPart2);
         break;
     case nsIMsgMdnGenerator::eProcessed:
         rv = GetStringFromName(
             "MsgMdnProcessed",
-            getter_Copies(firstPart2));
+            firstPart2);
         break;
     case nsIMsgMdnGenerator::eDeleted:
         rv = GetStringFromName(
             "MsgMdnDeleted",
-            getter_Copies(firstPart2));
+            firstPart2);
         break;
     case nsIMsgMdnGenerator::eDenied:
         rv = GetStringFromName(
             "MsgMdnDenied",
-            getter_Copies(firstPart2));
+            firstPart2);
         break;
     case nsIMsgMdnGenerator::eFailed:
         rv = GetStringFromName(
             "MsgMdnFailed",
-            getter_Copies(firstPart2));
+            firstPart2);
         break;
     default:
         rv = NS_ERROR_INVALID_ARG;
         break;
     }
 
     if (NS_FAILED(rv))
         return rv;
@@ -1124,18 +1124,18 @@ NS_IMETHODIMP nsMsgMdnGenerator::OnStopR
 
     rv = bundleService->CreateBundle(
       "chrome://messenger/locale/messengercompose/composeMsgs.properties",
       getter_AddRefs(bundle));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsString failed_msg, dialogTitle;
 
-    bundle->FormatStringFromName(exitString, params, 1, getter_Copies(failed_msg));
-    bundle->GetStringFromName("sendMessageErrorTitle", getter_Copies(dialogTitle));
+    bundle->FormatStringFromName(exitString, params, 1, failed_msg);
+    bundle->GetStringFromName("sendMessageErrorTitle", dialogTitle);
 
     nsCOMPtr<nsIPrompt> dialog;
     rv = m_window->GetPromptDialog(getter_AddRefs(dialog));
     if (NS_SUCCEEDED(rv))
       dialog->Alert(dialogTitle.get(),failed_msg.get());
 
     return NS_OK;
 }
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.h
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.h
@@ -47,20 +47,20 @@ private:
 
   nsresult CreateMdnMsg();
   nsresult CreateFirstPart();
   nsresult CreateSecondPart();
   nsresult CreateThirdPart();
   nsresult SendMdnMsg();
 
   // string bundle helper methods
-  nsresult GetStringFromName(const char *aName, char16_t **aResultString);
+  nsresult GetStringFromName(const char *aName, nsAString& aResultString);
   nsresult FormatStringFromName(const char *aName,
                                 const char16_t *aString,
-                                char16_t **aResultString);
+                                nsAString& aResultString);
 
   // other helper methods
   nsresult InitAndProcess(bool *needToAskUser);
   nsresult OutputAllHeaders();
   nsresult WriteString(const char *str);
 
 private:
   EDisposeType m_disposeType;
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
@@ -185,33 +185,32 @@ nsresult nsMsgComposeSecure::GetSMIMEBun
                                                   nsString &outString)
 {
   outString.Truncate();
 
   NS_ENSURE_ARG_POINTER(name);
 
   NS_ENSURE_TRUE(InitializeSMIMEBundle(), NS_ERROR_FAILURE);
 
-  return mSMIMEBundle->GetStringFromName(NS_ConvertUTF16toUTF8(name).get(), getter_Copies(outString));
+  return mSMIMEBundle->GetStringFromName(NS_ConvertUTF16toUTF8(name).get(), outString);
 }
 
 nsresult
 nsMsgComposeSecure::
 SMIMEBundleFormatStringFromName(const char *name,
                                 const char16_t **params,
                                 uint32_t numParams,
-                                char16_t **outString)
+                                nsAString& outString)
 {
   NS_ENSURE_ARG_POINTER(name);
 
   if (!InitializeSMIMEBundle())
     return NS_ERROR_FAILURE;
 
-  return mSMIMEBundle->FormatStringFromName(name, params,
-                                            numParams, outString);
+  return mSMIMEBundle->FormatStringFromName(name, params, numParams, outString);
 }
 
 bool nsMsgComposeSecure::InitializeSMIMEBundle()
 {
   if (mSMIMEBundle)
     return true;
 
   nsCOMPtr<nsIStringBundleService> bundleService =
@@ -258,17 +257,17 @@ void nsMsgComposeSecure::SetErrorWithPar
   const char16_t *params[1];
 
   NS_ConvertASCIItoUTF16 ucs2(param);
   params[0]= ucs2.get();
 
   res = SMIMEBundleFormatStringFromName(bundle_string,
                                         params,
                                         1,
-                                        getter_Copies(errorString));
+                                        errorString);
 
   if (NS_SUCCEEDED(res) && !errorString.IsEmpty())
   {
     sendReport->SetMessage(nsIMsgSendReport::process_Current,
                            errorString.get(),
                            true);
   }
 }
@@ -555,17 +554,17 @@ nsresult nsMsgComposeSecure::MimeInitEnc
   nsString mime_smime_enc_content_desc;
 
   bundleSvc->CreateBundle(SMIME_STRBUNDLE_URL, getter_AddRefs(sMIMEBundle));
 
   if (!sMIMEBundle)
     return NS_ERROR_FAILURE;
 
   sMIMEBundle->GetStringFromName("mime_smimeEncryptedContentDesc",
-                                 getter_Copies(mime_smime_enc_content_desc));
+                                 mime_smime_enc_content_desc);
   NS_ConvertUTF16toUTF8 enc_content_desc_utf8(mime_smime_enc_content_desc);
 
   nsCOMPtr<nsIMimeConverter> mimeConverter =
      do_GetService(NS_MIME_CONVERTER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCString encodedContentDescription;
   mimeConverter->EncodeMimePartIIStr_UTF8(enc_content_desc_utf8, false, "UTF-8",
       sizeof("Content-Description: "),
@@ -671,17 +670,17 @@ nsresult nsMsgComposeSecure::MimeFinishM
   nsString mime_smime_sig_content_desc;
 
   bundleSvc->CreateBundle(SMIME_STRBUNDLE_URL, getter_AddRefs(sMIMEBundle));
 
   if (!sMIMEBundle)
     return NS_ERROR_FAILURE;
 
   sMIMEBundle->GetStringFromName("mime_smimeSignatureContentDesc",
-                                 getter_Copies(mime_smime_sig_content_desc));
+                                 mime_smime_sig_content_desc);
 
   NS_ConvertUTF16toUTF8 sig_content_desc_utf8(mime_smime_sig_content_desc);
 
   /* Compute the hash...
    */
 
   nsAutoCString hashString;
   mDataHash->Finish(false, hashString);
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.h
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.h
@@ -66,17 +66,17 @@ private:
   nsresult MimeInitEncryption(bool aSign, nsIMsgSendReport *sendReport);
   nsresult MimeFinishMultipartSigned (bool aOuter, nsIMsgSendReport *sendReport);
   nsresult MimeFinishEncryption (bool aSign, nsIMsgSendReport *sendReport);
   nsresult MimeCryptoHackCerts(const char *aRecipients, nsIMsgSendReport *sendReport, bool aEncrypt, bool aSign, nsIMsgIdentity *aIdentity);
   bool InitializeSMIMEBundle();
   nsresult SMIMEBundleFormatStringFromName(const char *name,
 					   const char16_t **params,
 					   uint32_t numParams,
-					   char16_t **outString);
+					   nsAString& outString);
   nsresult ExtractEncryptionState(nsIMsgIdentity * aIdentity, nsIMsgCompFields * aComposeFields, bool * aSignMessage, bool * aEncrypt);
 
   mimeDeliveryCryptoState mCryptoState;
   nsCOMPtr<nsIOutputStream> mStream;
   int16_t mHashType;
   nsCOMPtr<nsICryptoHash> mDataHash;
   nsAutoPtr<MimeEncoder> mSigEncoder;
   char *mMultipartSignedBoundary;
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -1862,17 +1862,17 @@ nsImapIncomingServer::FEAlert(const nsAS
     if (NS_SUCCEEDED(rv))
     {
       nsString message;
       nsString tempString(aAlertString);
       const char16_t *params[] = { hostName.get(), tempString.get() };
 
       rv = m_stringBundle->FormatStringFromName(
         "imapServerAlert",
-        params, 2, getter_Copies(message));
+        params, 2, message);
       if (NS_SUCCEEDED(rv))
         return AlertUser(message, aUrl);
     }
   }
   return AlertUser(aAlertString, aUrl);
 }
 
 nsresult nsImapIncomingServer::AlertUser(const nsAString& aString,
@@ -1901,17 +1901,17 @@ nsImapIncomingServer::FEAlertWithName(co
   {
     nsAutoString hostName;
     nsresult rv = GetPrettyName(hostName);
     if (NS_SUCCEEDED(rv))
     {
       const char16_t *params[] = { hostName.get() };
       rv = m_stringBundle->FormatStringFromName(
         aMsgName,
-        params, 1,getter_Copies(message));
+        params, 1,message);
       if (NS_SUCCEEDED(rv))
         return AlertUser(message, aUrl);
     }
   }
 
   // Error condition
   message.AssignLiteral("String Name ");
   message.AppendASCII(aMsgName);
@@ -1985,17 +1985,17 @@ NS_IMETHODIMP  nsImapIncomingServer::FEA
 
   formatStrings[numStrings -1] = unicodeMsg.get();
 
   nsresult rv = GetStringBundle();
   NS_ENSURE_SUCCESS(rv, rv);
   if (m_stringBundle)
   {
     rv = m_stringBundle->FormatStringFromName(msgName,
-      formatStrings, numStrings, getter_Copies(fullMessage));
+      formatStrings, numStrings, fullMessage);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return AlertUser(fullMessage, aUrl);
 }
 
 #define IMAP_MSGS_URL       "chrome://messenger/locale/imapMsgs.properties"
 
@@ -2013,17 +2013,17 @@ nsresult nsImapIncomingServer::GetString
 NS_IMETHODIMP
 nsImapIncomingServer::GetImapStringByName(const char* msgName, nsAString& aString)
 {
   nsresult rv = NS_OK;
   GetStringBundle();
   if (m_stringBundle)
   {
     nsString res_str;
-    rv = m_stringBundle->GetStringFromName(msgName, getter_Copies(res_str));
+    rv = m_stringBundle->GetStringFromName(msgName, res_str);
     aString.Assign(res_str);
     if (NS_SUCCEEDED(rv))
       return rv;
   }
   aString.AssignLiteral("String Name ");
   // mscott: FIX ME
   aString.AppendASCII(msgName);
   return NS_OK;
@@ -2200,17 +2200,17 @@ nsImapIncomingServer::PromptPassword(nsI
   NS_ConvertASCIItoUTF16 finalUserName(userName);
   NS_ConvertASCIItoUTF16 finalHostName(hostName);
 
   const char16_t *formatStrings[] = { finalUserName.get(), finalHostName.get() };
 
   nsString passwordText;
   rv = m_stringBundle->FormatStringFromName(
     "imapEnterServerPasswordPrompt",
-    formatStrings, 2, getter_Copies(passwordText));
+    formatStrings, 2, passwordText);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = GetPasswordWithUI(passwordText, passwordTitle, aMsgWindow, aPassword);
   if (NS_SUCCEEDED(rv))
     m_password = aPassword;
   return rv;
 }
 
@@ -2939,17 +2939,17 @@ nsImapIncomingServer::GetFormattedString
   if (m_stringBundle)
   {
     nsString tmpVal (aValue);
     const char16_t *formatStrings[] = { tmpVal.get() };
 
     nsString result;
     rv = m_stringBundle->FormatStringFromName(
       aName,
-      formatStrings, 1, getter_Copies(result));
+      formatStrings, 1, result);
     aResult.Assign(result);
   }
   return rv;
 }
 
 nsresult
 nsImapIncomingServer::GetPrefForServerAttribute(const char *prefSuffix, bool *prefValue)
 {
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -1601,30 +1601,30 @@ NS_IMETHODIMP nsImapMailFolder::Rename (
       {
         const char16_t *formatStrings[] =
         {
           (const char16_t*)(intptr_t)m_hierarchyDelimiter
         };
         nsString alertString;
         rv = bundle->FormatStringFromName(
           "imapSpecialChar",
-          formatStrings, 1, getter_Copies(alertString));
+          formatStrings, 1, alertString);
         nsCOMPtr<nsIPrompt> dialog(do_GetInterface(docShell));
         // setting up the dialog title
         nsCOMPtr<nsIMsgIncomingServer> server;
         rv = GetServer(getter_AddRefs(server));
         NS_ENSURE_SUCCESS(rv, rv);
         nsString dialogTitle;
         nsString accountName;
         rv = server->GetPrettyName(accountName);
         NS_ENSURE_SUCCESS(rv, rv);
         const char16_t *titleParams[] = { accountName.get() };
         rv = bundle->FormatStringFromName(
           "imapAlertDialogTitle",
-          titleParams, 1, getter_Copies(dialogTitle));
+          titleParams, 1, dialogTitle);
 
         if (dialog && !alertString.IsEmpty())
           dialog->Alert(dialogTitle.get(), alertString.get());
       }
     }
     return NS_ERROR_FAILURE;
   }
   nsCOMPtr <nsIImapIncomingServer> incomingImapServer;
@@ -2423,30 +2423,30 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
     nsAutoString folderName;
     rv = curFolder->GetName(folderName);
     NS_ENSURE_SUCCESS(rv, rv);
     const char16_t *formatStrings[1] = { folderName.get() };
 
     nsAutoString deleteFolderDialogTitle;
     rv = bundle->GetStringFromName(
       "imapDeleteFolderDialogTitle",
-      getter_Copies(deleteFolderDialogTitle));
+      deleteFolderDialogTitle);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString deleteFolderButtonLabel;
     rv = bundle->GetStringFromName(
       "imapDeleteFolderButtonLabel",
-      getter_Copies(deleteFolderButtonLabel));
+      deleteFolderButtonLabel);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString confirmationStr;
     rv = bundle->FormatStringFromName((deleteNoTrash) ?
         "imapDeleteNoTrash" :
         "imapMoveFolderToTrash",
-      formatStrings, 1, getter_Copies(confirmationStr));
+      formatStrings, 1, confirmationStr);
     NS_ENSURE_SUCCESS(rv, rv);
     if (!msgWindow)
       return NS_ERROR_NULL_POINTER;
     nsCOMPtr<nsIDocShell> docShell;
     msgWindow->GetRootDocShell(getter_AddRefs(docShell));
     nsCOMPtr<nsIPrompt> dialog;
     if (docShell)
       dialog = do_GetInterface(docShell);
@@ -6057,17 +6057,17 @@ nsImapMailFolder::FillInFolderProps(nsIM
     else
     {
       // is this right? It doesn't leak, does it?
       CopyASCIItoUTF16(owner, uniOwner);
     }
     const char16_t *params[] = { uniOwner.get() };
     rv = bundle->FormatStringFromName(
       "imapOtherUsersFolderTypeDescription",
-      params, 1, getter_Copies(folderTypeDesc));
+      params, 1, folderTypeDesc);
   }
   else if (GetFolderACL()->GetIsFolderShared())
   {
     folderTypeStringID = "imapPersonalSharedFolderTypeName";
     folderTypeDescStringID = "imapPersonalSharedFolderTypeDescription";
   }
   else
   {
@@ -6585,90 +6585,79 @@ nsresult nsMsgIMAPFolderACL::CreateACLRi
 {
   nsString curRight;
   nsCOMPtr<nsIStringBundle> bundle;
   nsresult rv = IMAPGetStringBundle(getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (GetDoIHaveFullRightsForFolder()) {
     nsAutoString result;
-    rv = bundle->GetStringFromName("imapAclFullRights",
-                                   getter_Copies(result));
+    rv = bundle->GetStringFromName("imapAclFullRights", result);
     aRightsString.Assign(result);
     return rv;
   }
 
   if (GetCanIReadFolder())
   {
-    bundle->GetStringFromName("imapAclReadRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclReadRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIWriteFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclWriteRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclWriteRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIInsertInFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclInsertRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclInsertRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanILookupFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclLookupRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclLookupRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIStoreSeenInFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclSeenRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclSeenRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIDeleteInFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclDeleteRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclDeleteRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIExpungeFolder())
   {
     if (!aRightsString.IsEmpty())
       aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclExpungeRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclExpungeRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanICreateSubfolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclCreateRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclCreateRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIPostToFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclPostRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclPostRight", curRight);
     aRightsString.Append(curRight);
   }
   if (GetCanIAdministerFolder())
   {
     if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-    bundle->GetStringFromName("imapAclAdministerRight",
-                              getter_Copies(curRight));
+    bundle->GetStringFromName("imapAclAdministerRight", curRight);
     aRightsString.Append(curRight);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetFilePath(nsIFile ** aPathName)
 {
   // this will return a copy of mPath, which is what we want.
@@ -8201,17 +8190,17 @@ nsImapMailFolder::CopyStreamMessage(nsIM
                                             dstFolderName.get()
                                             };
 
       nsCOMPtr <nsIStringBundle> bundle;
       rv = IMAPGetStringBundle(getter_AddRefs(bundle));
       NS_ENSURE_SUCCESS(rv, rv);
       rv = bundle->FormatStringFromName(
         "imapCopyingMessageOf2",
-        formatStrings, 3, getter_Copies(progressText));
+        formatStrings, 3, progressText);
       nsCOMPtr <nsIMsgStatusFeedback> statusFeedback;
       if (m_copyState->m_msgWindow)
         m_copyState->m_msgWindow->GetStatusFeedback(getter_AddRefs(statusFeedback));
       if (statusFeedback)
       {
         statusFeedback->ShowStatusString(progressText);
         int32_t percent;
         percent = (100 * m_copyState->m_curIndex) / (int32_t) m_copyState->m_totalCount;
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -555,18 +555,17 @@ nsImapProtocol::Initialize(nsIImapHostSe
   m_hostSessionList = aHostSessionList; // no ref count...host session list has life time > connection
   m_parser.SetHostSessionList(aHostSessionList);
   m_parser.SetFlagState(m_flagState);
 
   // Initialize the empty mime part string on the main thread.
   rv = IMAPGetStringBundle(getter_AddRefs(m_bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = m_bundle->GetStringFromName("imapEmptyMimePart",
-    getter_Copies(m_emptyMimePartString));
+  rv = m_bundle->GetStringFromName("imapEmptyMimePart", m_emptyMimePartString);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Now initialize the thread for the connection
   if (m_thread == nullptr)
   {
     nsresult rv = NS_NewThread(getter_AddRefs(m_iThread), this);
     if (NS_FAILED(rv))
     {
@@ -5231,17 +5230,17 @@ nsImapProtocol::ShowProgress()
     const char16_t *formatStrings[] = {
       progressCurrentNumberString.get(),
       progressExpectedNumberString.get(),
       unicodeMailboxName.get()
     };
 
     rv = m_bundle->FormatStringFromName(
                     m_progressStringName.get(),
-                    formatStrings, 3, getter_Copies(progressString));
+                    formatStrings, 3, progressString);
 
     if (NS_SUCCEEDED(rv) && !progressString.IsEmpty())
     {
       PercentProgressUpdateEvent(progressString.get(), progressCurrentNumber,
                                 m_progressExpectedNumber);
     }
   }
 }
--- a/mailnews/imap/src/nsImapService.cpp
+++ b/mailnews/imap/src/nsImapService.cpp
@@ -2762,17 +2762,17 @@ NS_IMETHODIMP nsImapService::NewChannel2
         // need to convert folder name from mod-utf7 to unicode
       nsAutoString unescapedName;
       if (NS_FAILED(CopyMUTF7toUTF16(fullFolderName, unescapedName)))
         CopyASCIItoUTF16(fullFolderName, unescapedName);
       const char16_t *formatStrings[1] = { unescapedName.get() };
 
       rv = bundle->FormatStringFromName(
         "imapSubscribePrompt",
-        formatStrings, 1, getter_Copies(confirmText));
+        formatStrings, 1, confirmText);
       NS_ENSURE_SUCCESS(rv,rv);
 
       bool confirmResult = false;
       rv = dialog->Confirm(nullptr, confirmText.get(), &confirmResult);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (confirmResult)
       {
--- a/mailnews/imap/src/nsImapStringBundle.cpp
+++ b/mailnews/imap/src/nsImapStringBundle.cpp
@@ -16,18 +16,21 @@
 #define IMAP_MSGS_URL       "chrome://messenger/locale/imapMsgs.properties"
 
 extern "C" 
 nsresult
 IMAPGetStringByName(const char* stringName, char16_t **aString)
 {
   nsCOMPtr <nsIStringBundle> sBundle;
   nsresult rv = IMAPGetStringBundle(getter_AddRefs(sBundle));
-  if (NS_SUCCEEDED(rv) && sBundle)
-    rv = sBundle->GetStringFromName(stringName, aString);
+  if (NS_SUCCEEDED(rv) && sBundle) {
+    nsAutoString string;
+    rv = sBundle->GetStringFromName(stringName, string);
+    *aString = ToNewUnicode(string);
+  }
   return rv;
 }
 
 nsresult
 IMAPGetStringBundle(nsIStringBundle **aBundle)
 {
   nsresult rv=NS_OK;
   nsCOMPtr<nsIStringBundleService> stringService =
--- a/mailnews/import/applemail/src/nsAppleMailImport.cpp
+++ b/mailnews/import/applemail/src/nsAppleMailImport.cpp
@@ -51,24 +51,36 @@ nsAppleMailImportModule::~nsAppleMailImp
 }
 
 
 NS_IMPL_ISUPPORTS(nsAppleMailImportModule, nsIImportModule)
 
 
 NS_IMETHODIMP nsAppleMailImportModule::GetName(char16_t **aName)
 {
-  return mBundle ?
-    mBundle->GetStringFromName("ApplemailImportName", aName) : NS_ERROR_FAILURE;
+  if (!mBundle) {
+    return NS_ERROR_FAILURE;
+  }
+  nsAutoString name;
+  nsresult rv = mBundle->GetStringFromName("ApplemailImportName", name);
+  NS_ENSURE_SUCCESS(rv, rv);
+  *aName = ToNewUnicode(name);
+  return rv;
 }
 
 NS_IMETHODIMP nsAppleMailImportModule::GetDescription(char16_t **aName)
 {
-  return mBundle ?
-    mBundle->GetStringFromName("ApplemailImportDescription", aName) : NS_ERROR_FAILURE;
+  if (!mBundle) {
+    return NS_ERROR_FAILURE;
+  }
+  nsAutoString name;
+  nsresult rv = mBundle->GetStringFromName("ApplemailImportDescription", name);
+  NS_ENSURE_SUCCESS(rv, rv);
+  *aName = ToNewUnicode(name);
+  return rv;
 }
 
 NS_IMETHODIMP nsAppleMailImportModule::GetSupports(char **aSupports)
 {
   NS_ENSURE_ARG_POINTER(aSupports);
   *aSupports = strdup(NS_IMPORT_MAIL_STR);
   return NS_OK;
 }
@@ -91,17 +103,17 @@ NS_IMETHODIMP nsAppleMailImportModule::G
     nsCOMPtr<nsIImportMail> mail(do_CreateInstance(NS_APPLEMAILIMPL_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv)) {
       nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
       if (NS_SUCCEEDED(rv)) {
         nsCOMPtr<nsIImportGeneric> generic;
         rv = impSvc->CreateNewGenericMail(getter_AddRefs(generic));
         if (NS_SUCCEEDED(rv)) {
           nsAutoString name;
-          rv = mBundle->GetStringFromName("ApplemailImportName", getter_Copies(name));
+          rv = mBundle->GetStringFromName("ApplemailImportName", name);
           NS_ENSURE_SUCCESS(rv, rv);
 
           nsCOMPtr<nsISupportsString> nameString(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
           NS_ENSURE_SUCCESS(rv, rv);
           nameString->SetData(name);
 
           generic->SetData("name", nameString);
           generic->SetData("mailInterface", mail);
@@ -582,17 +594,17 @@ nsAppleMailImportMail::ImportMailbox(nsI
 }
 
 void nsAppleMailImportMail::ReportStatus(const char16_t* aErrorName, nsString &aName,
                                          nsAString &aStream)
 {
   // get (and format, if needed) the error string from the bundle
   nsAutoString outString;
   const char16_t *fmt = { aName.get() };
-  nsresult rv = mBundle->FormatStringFromName(NS_ConvertUTF16toUTF8(aErrorName).get(), &fmt, 1, getter_Copies(outString));
+  nsresult rv = mBundle->FormatStringFromName(NS_ConvertUTF16toUTF8(aErrorName).get(), &fmt, 1, outString);
   // write it out the stream
   if (NS_SUCCEEDED(rv)) {
     aStream.Append(outString);
     aStream.Append(char16_t('\n'));
   }
 }
 
 void nsAppleMailImportMail::SetLogs(const nsAString &aSuccess, const nsAString &aError, char16_t **aOutSuccess, char16_t **aOutError)
--- a/mailnews/import/becky/src/nsBeckyMail.cpp
+++ b/mailnews/import/becky/src/nsBeckyMail.cpp
@@ -613,17 +613,17 @@ nsBeckyMail::ImportMailbox(nsIImportMail
   aSource->GetDisplayName(getter_Copies(name));
 
   nsAutoString successMessage;
   const char16_t *format = { name.get() };
   rv =
       nsBeckyStringBundle::FormatStringFromName("BeckyImportMailboxSuccess",
                                                 &format,
                                                 1,
-                                                getter_Copies(successMessage));
+                                                successMessage);
   successMessage.AppendLiteral("\n");
   *aSuccessLog = ToNewUnicode(successMessage);
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsBeckyMail::GetImportProgress(uint32_t *_retval)
--- a/mailnews/import/becky/src/nsBeckyStringBundle.cpp
+++ b/mailnews/import/becky/src/nsBeckyStringBundle.cpp
@@ -39,28 +39,30 @@ nsBeckyStringBundle::EnsureStringBundle(
     (void) GetStringBundle();
 }
 
 char16_t *
 nsBeckyStringBundle::GetStringByName(const char *aName)
 {
   EnsureStringBundle();
 
-  char16_t *string = nullptr;
-  if (mBundle)
-    mBundle->GetStringFromName(aName, &string);
+  if (mBundle) {
+    nsAutoString string;
+    mBundle->GetStringFromName(aName, string);
+    return ToNewUnicode(string);
+  }
 
-  return string;
+  return nullptr;
 }
 
 nsresult
 nsBeckyStringBundle::FormatStringFromName(const char *name,
                                           const char16_t **params,
                                           uint32_t length,
-                                          char16_t **_retval)
+                                          nsAString& _retval)
 {
   EnsureStringBundle();
 
   return mBundle->FormatStringFromName(name,
                                        params,
                                        length,
                                        _retval);
 }
--- a/mailnews/import/becky/src/nsBeckyStringBundle.h
+++ b/mailnews/import/becky/src/nsBeckyStringBundle.h
@@ -9,17 +9,17 @@
 class nsIStringBundle;
 
 class nsBeckyStringBundle final {
 public:
   static char16_t *GetStringByName(const char *name);
   static nsresult FormatStringFromName(const char *name,
                                        const char16_t **params,
                                        uint32_t length,
-                                       char16_t **_retval);
+                                       nsAString& _retval);
   static nsIStringBundle * GetStringBundle(void); // don't release
   static void EnsureStringBundle(void);
   static void Cleanup(void);
 private:
   static nsIStringBundle *mBundle;
 };
 
 #define BECKYIMPORT_NAME                     2000
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -900,21 +900,20 @@ bool nsImportGenericMail::CreateFolder(n
   rv = bundleService->CreateBundle(IMPORT_MSGS_URL, getter_AddRefs(bundle));
   if (NS_FAILED(rv))
       return false;
   nsString folderName;
   if (!m_pName.IsEmpty()) {
     const char16_t *moduleName[] = { m_pName.get() };
     rv = bundle->FormatStringFromName("ImportModuleFolderName",
                                       moduleName, 1,
-                                      getter_Copies(folderName));
+                                      folderName);
   }
   else {
-    rv = bundle->GetStringFromName("DefaultFolderName",
-                                   getter_Copies(folderName));
+    rv = bundle->GetStringFromName("DefaultFolderName", folderName);
   }
   if (NS_FAILED(rv)) {
       IMPORT_LOG0("*** Failed to get Folder Name!\n");
       return false;
   }
   nsCOMPtr <nsIMsgAccountManager> accMgr = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) {
     IMPORT_LOG0("*** Failed to create account manager!\n");
--- a/mailnews/import/src/nsImportStringBundle.cpp
+++ b/mailnews/import/src/nsImportStringBundle.cpp
@@ -33,21 +33,20 @@ void nsImportStringBundle::GetStringByID
   aResult.Adopt(GetStringByID(aStringID, aBundle));
 }
 
 char16_t *nsImportStringBundle::GetStringByID(int32_t aStringID,
                                                nsIStringBundle *aBundle)
 {
   if (aBundle)
   {
-    char16_t *ptrv = nullptr;
-    nsresult rv = aBundle->GetStringFromID(aStringID, &ptrv);
-
-    if (NS_SUCCEEDED(rv) && ptrv)
-      return ptrv;
+    nsAutoString str;
+    nsresult rv = aBundle->GetStringFromID(aStringID, str);
+    if (NS_SUCCEEDED(rv))
+      return ToNewUnicode(str);
   }
 
   nsString resultString(NS_LITERAL_STRING("[StringID "));
   resultString.AppendInt(aStringID);
   resultString.AppendLiteral("?]");
 
   return ToNewUnicode(resultString);
 }
@@ -59,21 +58,20 @@ void nsImportStringBundle::GetStringByNa
   aResult.Adopt(GetStringByName(aName, aBundle));
 }
 
 char16_t *nsImportStringBundle::GetStringByName(const char *aName,
                                                  nsIStringBundle *aBundle)
 {
   if (aBundle)
   {
-    char16_t *ptrv = nullptr;
-    nsresult rv = aBundle->GetStringFromName(aName, &ptrv);
-
-    if (NS_SUCCEEDED(rv) && ptrv)
-      return ptrv;
+    nsAutoString str;
+    nsresult rv = aBundle->GetStringFromName(aName, str);
+    if (NS_SUCCEEDED(rv))
+      return ToNewUnicode(str);
   }
 
   nsString resultString(NS_LITERAL_STRING("[StringName "));
   resultString.Append(NS_ConvertUTF8toUTF16(aName).get());
   resultString.AppendLiteral("?]");
 
   return ToNewUnicode(resultString);
 }
--- a/mailnews/intl/nsCharsetConverterManager.cpp
+++ b/mailnews/intl/nsCharsetConverterManager.cpp
@@ -52,20 +52,20 @@ nsresult LoadExtensibleBundle(const char
     mozilla::services::GetStringBundleService();
   if (!sbServ)
     return NS_ERROR_FAILURE;
 
   return sbServ->CreateExtensibleBundle(aCategory, aResult);
 }
 
 static
-nsresult GetBundleValue(nsIStringBundle * aBundle,
+nsresult GetBundleValueInner(nsIStringBundle * aBundle,
                         const char * aName,
                         const nsString& aProp,
-                        char16_t ** aResult)
+                        nsAString& aResult)
 {
   nsAutoString key;
 
   CopyASCIItoUTF16(aName, key);
   ToLowerCase(key); // we lowercase the main comparison key
   key.Append(aProp);
 
   return aBundle->GetStringFromName(NS_ConvertUTF16toUTF8(key).get(), aResult);
@@ -74,18 +74,18 @@ nsresult GetBundleValue(nsIStringBundle 
 static
 nsresult GetBundleValue(nsIStringBundle * aBundle,
                         const char * aName,
                         const nsString& aProp,
                         nsAString& aResult)
 {
   nsresult rv = NS_OK;
 
-  nsXPIDLString value;
-  rv = GetBundleValue(aBundle, aName, aProp, getter_Copies(value));
+  nsAutoString value;
+  rv = GetBundleValueInner(aBundle, aName, aProp, value);
   if (NS_FAILED(rv))
     return rv;
 
   aResult = value;
 
   return NS_OK;
 }
 
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -843,29 +843,29 @@ nsresult nsMsgLocalMailFolder::ConfirmFo
       nsAutoString folderName;
       rv = aFolder->GetName(folderName);
       NS_ENSURE_SUCCESS(rv, rv);
       const char16_t *formatStrings[1] = { folderName.get() };
 
       nsAutoString deleteFolderDialogTitle;
       rv = bundle->GetStringFromName(
         "pop3DeleteFolderDialogTitle",
-        getter_Copies(deleteFolderDialogTitle));
+        deleteFolderDialogTitle);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsAutoString deleteFolderButtonLabel;
       rv = bundle->GetStringFromName(
         "pop3DeleteFolderButtonLabel",
-        getter_Copies(deleteFolderButtonLabel));
+        deleteFolderButtonLabel);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsAutoString confirmationStr;
       rv = bundle->FormatStringFromName(
         "pop3MoveFolderToTrash", formatStrings, 1,
-        getter_Copies(confirmationStr));
+        confirmationStr);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsCOMPtr<nsIPrompt> dialog(do_GetInterface(docShell));
       if (dialog)
       {
         int32_t buttonPressed = 0;
         // Default the dialog to "cancel".
         const uint32_t buttonFlags =
@@ -3342,17 +3342,17 @@ nsresult nsMsgLocalMailFolder::DisplayMo
       nsAutoString totalMessagesString;
       totalMessagesString.AppendInt(mCopyState->m_totalMsgCount);
       nsString finalString;
       const char16_t * stringArray[] = { numMsgSoFarString.get(), totalMessagesString.get(), folderName.get() };
       rv = mCopyState->m_stringBundle->FormatStringFromName(
         (mCopyState->m_isMove) ?
         "movingMessagesStatus" :
         "copyingMessagesStatus",
-        stringArray, 3, getter_Copies(finalString));
+        stringArray, 3, finalString);
       int64_t nowMS = PR_IntervalToMilliseconds(PR_IntervalNow());
 
       // only update status/progress every half second
       if (nowMS - mCopyState->m_lastProgressTime < 500 &&
           mCopyState->m_curCopyIndex < mCopyState->m_totalMsgCount)
         return NS_OK;
 
       mCopyState->m_lastProgressTime = nowMS;
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -133,20 +133,19 @@ nsMovemailService::Error(const char* err
   rv = bundleService->CreateBundle("chrome://messenger/locale/localMsgs.properties", getter_AddRefs(bundle));
   if (NS_FAILED(rv))
     return;
 
   nsString errStr;
   // Format the error string if necessary
   if (params)
     bundle->FormatStringFromName(errorCode,
-                                 params, length, getter_Copies(errStr));
+                                 params, length, errStr);
   else
-    bundle->GetStringFromName(errorCode,
-                              getter_Copies(errStr));
+    bundle->GetStringFromName(errorCode, errStr);
 
   if (!errStr.IsEmpty()) {
     dialog->Alert(nullptr, errStr.get());
   }
 }
 
 SpoolLock::SpoolLock(nsACString *aSpoolName, int aSeconds,
                      nsMovemailService &aMovemail,
--- a/mailnews/local/src/nsParseMailbox.cpp
+++ b/mailnews/local/src/nsParseMailbox.cpp
@@ -290,17 +290,17 @@ void nsMsgMailboxParser::UpdateStatusTex
       return;
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://messenger/locale/localMsgs.properties", getter_AddRefs(bundle));
     if (NS_FAILED(rv))
       return;
     nsString finalString;
     const char16_t * stringArray[] = { m_folderName.get() };
     rv = bundle->FormatStringFromName(stringName,
-                                      stringArray, 1, getter_Copies(finalString));
+                                      stringArray, 1, finalString);
     m_statusFeedback->ShowStatusString(finalString);
   }
 }
 
 void nsMsgMailboxParser::UpdateProgressPercent ()
 {
   if (m_statusFeedback && m_graph_progress_total != 0)
   {
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -650,23 +650,23 @@ nsresult nsPop3Protocol::FormatCounterSt
 
   const char16_t *formatStrings[] = {
     count1String.get(),
     count2String.get()
   };
 
   return mLocalBundle->FormatStringFromName(NS_ConvertUTF16toUTF8(stringName).get(),
                                             formatStrings, 2,
-                                            getter_Copies(resultString));
+                                            resultString);
 }
 
 void nsPop3Protocol::UpdateStatus(const char *aStatusName)
 {
   nsString statusMessage;
-  mLocalBundle->GetStringFromName(aStatusName, getter_Copies(statusMessage));
+  mLocalBundle->GetStringFromName(aStatusName, statusMessage);
   UpdateStatusWithString(statusMessage.get());
 }
 
 void nsPop3Protocol::UpdateStatusWithString(const char16_t *aStatusString)
 {
     if (mProgressEventSink)
     {
       mozilla::DebugOnly<nsresult> rv =
@@ -881,29 +881,29 @@ NS_IMETHODIMP nsPop3Protocol::OnPromptSt
           // again.
           ProcessProtocolState(nullptr, nullptr, 0, 0);
           return NS_OK;
         }
       }
     }
     mLocalBundle->FormatStringFromName(
       "pop3PreviouslyEnteredPasswordIsInvalidPrompt",
-      passwordParams, 2, getter_Copies(passwordPrompt));
+      passwordParams, 2, passwordPrompt);
   }
   else
     // Otherwise this is the first time we've asked about the server's
     // password so show a first time prompt.
     mLocalBundle->FormatStringFromName(
       "pop3EnterPasswordPrompt",
-      passwordParams, 2, getter_Copies(passwordPrompt));
+      passwordParams, 2, passwordPrompt);
 
   nsString passwordTitle;
   mLocalBundle->GetStringFromName(
     "pop3EnterPasswordPromptTitle",
-    getter_Copies(passwordTitle));
+    passwordTitle);
 
   // Now go and get the password.
   if (!passwordPrompt.IsEmpty() && !passwordTitle.IsEmpty())
     rv = server->GetPasswordWithUI(passwordPrompt, passwordTitle,
                                     msgWindow, passwordResult);
   ClearFlag(POP3_PASSWORD_FAILED|POP3_AUTH_FAILURE);
 
   // If it failed or the user cancelled the prompt, just abort the
@@ -1317,37 +1317,36 @@ nsPop3Protocol::Error(const char* err_co
     nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
     nsString accountName;
     nsresult rv = server->GetPrettyName(accountName);
     NS_ENSURE_SUCCESS(rv, -1);
     const char16_t *titleParams[] = { accountName.get() };
     nsString dialogTitle;
     mLocalBundle->FormatStringFromName(
       "pop3ErrorDialogTitle",
-      titleParams, 1, getter_Copies(dialogTitle));
+      titleParams, 1, dialogTitle);
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url, &rv);
     // we handle "pop3TmpDownloadError" earlier...
     if (strcmp(err_code, "pop3TmpDownloadError") && NS_SUCCEEDED(rv))
     {
         nsCOMPtr<nsIMsgWindow> msgWindow;
         nsCOMPtr<nsIPrompt> dialog;
         rv = mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow)); //it is ok to have null msgWindow, for example when biffing
         if (NS_SUCCEEDED(rv) && msgWindow)
         {
             rv = msgWindow->GetPromptDialog(getter_AddRefs(dialog));
             if (NS_SUCCEEDED(rv))
             {
               nsString alertString;
               // Format the alert string if parameter list isn't empty
               if (params)
                 mLocalBundle->FormatStringFromName(err_code,
-                                                   params, length, getter_Copies(alertString));
+                                                   params, length, alertString);
               else
-                mLocalBundle->GetStringFromName(err_code,
-                                                getter_Copies(alertString));
+                mLocalBundle->GetStringFromName(err_code, alertString);
               if (m_pop3ConData->command_succeeded)  //not a server error message
                 dialog->Alert(dialogTitle.get(), alertString.get());
               else
               {
                 nsString serverSaidPrefix;
                 nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
                 nsCString hostName;
                 // Fomat string with hostname.
@@ -1355,17 +1354,17 @@ nsPop3Protocol::Error(const char* err_co
                   rv = server->GetRealHostName(hostName);
                 if (NS_SUCCEEDED(rv))
                 {
                   nsAutoString hostStr;
                   CopyASCIItoUTF16(hostName, hostStr);
                   const char16_t *params[] = { hostStr.get() };
                   mLocalBundle->FormatStringFromName(
                     "pop3ServerSaid",
-                    params, 1, getter_Copies(serverSaidPrefix));
+                    params, 1, serverSaidPrefix);
                 }
 
                 nsAutoString message(alertString);
                 message.AppendLiteral(" ");
                 message.Append(serverSaidPrefix);
                 message.AppendLiteral(" ");
                 message.Append(NS_ConvertASCIItoUTF16(m_commandResponse));
                 dialog->Alert(dialogTitle.get(), message.get());
@@ -3504,17 +3503,17 @@ nsPop3Protocol::TopResponse(nsIInputStre
 
     Note that the progress bar will not be accurate in this case.
     Oops. #### */
     m_pop3ConData->truncating_cur_msg = false;
 
     nsString statusTemplate;
     mLocalBundle->GetStringFromName(
       "pop3ServerDoesNotSupportTopCommand",
-      getter_Copies(statusTemplate));
+      statusTemplate);
     if (!statusTemplate.IsEmpty())
     {
       nsAutoCString hostName;
       char16_t * statusString = nullptr;
       m_url->GetHost(hostName);
 
       statusString = nsTextFormatter::smprintf(statusTemplate.get(), hostName.get());
       UpdateStatusWithString(statusString);
--- a/mailnews/local/src/nsPop3Service.cpp
+++ b/mailnews/local/src/nsPop3Service.cpp
@@ -462,20 +462,20 @@ void nsPop3Service::AlertServerBusy(nsIM
   rv = server->GetPrettyName(accountName);
   NS_ENSURE_SUCCESS_VOID(rv);
 
   const char16_t *params[] = { accountName.get() };
   nsString alertString;
   nsString dialogTitle;
   bundle->FormatStringFromName(
     "pop3ServerBusy",
-    params, 1, getter_Copies(alertString));
+    params, 1, alertString);
   bundle->FormatStringFromName(
     "pop3ErrorDialogTitle",
-    params, 1, getter_Copies(dialogTitle));
+    params, 1, dialogTitle);
   if (!alertString.IsEmpty())
     dialog->Alert(dialogTitle.get(), alertString.get());
 }
 
 NS_IMETHODIMP nsPop3Service::NewChannel(nsIURI *aURI, nsIChannel **_retval)
 {
   return NewChannel2(aURI, nullptr, _retval);
 }
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -764,17 +764,17 @@ nsresult nsPop3Sink::HandleTempDownloadF
   NS_ENSURE_SUCCESS(rv, rv);
   nsString fromStr, subjectStr, confirmString;
 
   m_newMailParser->m_newMsgHdr->GetMime2DecodedSubject(subjectStr);
   m_newMailParser->m_newMsgHdr->GetMime2DecodedAuthor(fromStr);
   const char16_t *params[] = { fromStr.get(), subjectStr.get() };
   bundle->FormatStringFromName(
     "pop3TmpDownloadError",
-    params, 2, getter_Copies(confirmString));
+    params, 2, confirmString);
   nsCOMPtr<mozIDOMWindowProxy> parentWindow;
   nsCOMPtr<nsIPromptService> promptService = do_GetService(NS_PROMPTSERVICE_CONTRACTID);
   nsCOMPtr<nsIDocShell> docShell;
   if (msgWindow)
   {
     (void) msgWindow->GetRootDocShell(getter_AddRefs(docShell));
     parentWindow = do_QueryInterface(docShell);
   }
--- a/mailnews/mapi/mapihook/src/msgMapiHook.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiHook.cpp
@@ -141,46 +141,43 @@ bool nsMapiHook::DisplayLoginDialog(bool
 
     nsCOMPtr<nsIStringBundle> brandBundle;
     rv = bundleService->CreateBundle(
                     "chrome://branding/locale/brand.properties",
                     getter_AddRefs(brandBundle));
     if (NS_FAILED(rv)) return false;
 
     nsString brandName;
-    rv = brandBundle->GetStringFromName(
-                       "brandFullName",
-                       getter_Copies(brandName));
+    rv = brandBundle->GetStringFromName("brandFullName", brandName);
     if (NS_FAILED(rv)) return false;
 
     nsString loginTitle;
     const char16_t *brandStrings[] = { brandName.get() };
     rv = bundle->FormatStringFromName("loginTitle", brandStrings, 1,
-                                      getter_Copies(loginTitle));
+                                      loginTitle);
     if (NS_FAILED(rv)) return false;
 
     if (aLogin)
     {
       nsString loginText;
-      rv = bundle->GetStringFromName("loginTextwithName",
-                                     getter_Copies(loginText));
+      rv = bundle->GetStringFromName("loginTextwithName", loginText);
       if (NS_FAILED(rv) || loginText.IsEmpty()) return false;
 
       bool dummyValue = false;
       rv = dlgService->PromptUsernameAndPassword(nullptr, loginTitle.get(),
                                                  loginText.get(), aUsername, aPassword,
                                                  nullptr, &dummyValue, &btnResult);
     }
     else
     {
       //nsString loginString;
       nsString loginText;
       const char16_t *userNameStrings[] = { *aUsername };
       rv = bundle->FormatStringFromName("loginText", userNameStrings, 1,
-                                        getter_Copies(loginText));
+                                        loginText);
       if (NS_FAILED(rv)) return false;
 
       bool dummyValue = false;
       rv = dlgService->PromptPassword(nullptr, loginTitle.get(), loginText.get(),
                                       aPassword, nullptr, &dummyValue, &btnResult);
     }
   }
 
@@ -246,23 +243,22 @@ nsMapiHook::IsBlindSendAllowed()
     mozilla::services::GetStringBundleService();
   if (!bundleService) return false;
 
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
   if (NS_FAILED(rv) || !bundle) return false;
 
   nsString warningMsg;
-  rv = bundle->GetStringFromName("mapiBlindSendWarning",
-                                 getter_Copies(warningMsg));
+  rv = bundle->GetStringFromName("mapiBlindSendWarning", warningMsg);
   if (NS_FAILED(rv)) return false;
 
   nsString dontShowAgainMessage;
   rv = bundle->GetStringFromName("mapiBlindSendDontShowAgain",
-                                 getter_Copies(dontShowAgainMessage));
+                                 dontShowAgainMessage);
   if (NS_FAILED(rv)) return false;
 
   nsCOMPtr<nsIPromptService> dlgService(do_GetService(NS_PROMPTSERVICE_CONTRACTID, &rv));
   if (NS_FAILED(rv) || !dlgService) return false;
 
   bool continueToWarn = true;
   bool okayToContinue = false;
   dlgService->ConfirmCheck(nullptr, nullptr, warningMsg.get(), dontShowAgainMessage.get(), &continueToWarn, &okayToContinue);
--- a/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
+++ b/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
@@ -83,17 +83,17 @@ static void PgpMimeGetNeedsAddonString(n
                                    getter_Copies(url))))
     return;
 
   NS_ConvertUTF8toUTF16 url16(url);
   const char16_t *formatStrings[] = { url16.get() };
 
   nsString result;
   rv = stringBundle->FormatStringFromName(PGPMIME_STR_NOT_SUPPORTED_ID,
-                                          formatStrings, 1, getter_Copies(result));
+                                          formatStrings, 1, result);
   if (NS_FAILED(rv))
     return;
   aResult = NS_ConvertUTF16toUTF8(result);
 }
 
 static int
 MimeEncryptedPgpClassInitialize(MimeEncryptedPgpClass *clazz)
 {
--- a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
@@ -203,18 +203,17 @@ nsMimeBaseEmitter::MimeGetStringByName(c
       res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(m_headerStringBundle));
     }
   }
 
   if (m_headerStringBundle)
   {
     nsString val;
 
-    res = m_headerStringBundle->GetStringFromName(aHeaderName,
-                                                  getter_Copies(val));
+    res = m_headerStringBundle->GetStringFromName(aHeaderName, val);
 
     if (NS_FAILED(res))
       return nullptr;
 
     // Here we need to return a new copy of the string
     // This returns a UTF-8 string so the caller needs to perform a conversion
     // if this is used as UCS-2 (e.g. cannot do nsString(utfStr);
     //
@@ -239,18 +238,17 @@ nsMimeBaseEmitter::MimeGetStringByID(int
       mozilla::services::GetStringBundleService();
     if (sBundleService)
       res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle));
   }
 
   if (m_stringBundle)
   {
     nsString val;
-
-    res = m_stringBundle->GetStringFromID(aID, getter_Copies(val));
+    res = m_stringBundle->GetStringFromID(aID, val);
 
     if (NS_FAILED(res))
       return nullptr;
 
     return ToNewUTF8String(val);
   }
   else
     return nullptr;
--- a/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
@@ -433,18 +433,17 @@ nsMimeHtmlDisplayEmitter::StartAttachmen
       NS_ENSURE_TRUE(bundleSvc, NS_ERROR_UNEXPECTED);
 
       nsCOMPtr<nsIStringBundle> bundle;
       rv = bundleSvc->CreateBundle("chrome://messenger/locale/messenger.properties",
                                    getter_AddRefs(bundle));
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsString attachmentsHeader;
-      bundle->GetStringFromName("attachmentsPrintHeader",
-                                getter_Copies(attachmentsHeader)); 
+      bundle->GetStringFromName("attachmentsPrintHeader", attachmentsHeader);
 
       UtilityWrite("<legend class=\"mimeAttachmentHeaderName\">");
       nsCString escapedName;
       escapedName.Adopt(MsgEscapeHTML(NS_ConvertUTF16toUTF8(attachmentsHeader).get()));
       UtilityWrite(escapedName.get());
       UtilityWrite("</legend>");
     }
     UtilityWrite("</fieldset>");
--- a/mailnews/mime/src/mimemoz2.cpp
+++ b/mailnews/mime/src/mimemoz2.cpp
@@ -1906,17 +1906,17 @@ MimeGetStringByID(int32_t stringID)
   nsCOMPtr<nsIStringBundleService> stringBundleService =
     mozilla::services::GetStringBundleService();
 
   nsCOMPtr<nsIStringBundle> stringBundle;
   stringBundleService->CreateBundle(MIME_URL, getter_AddRefs(stringBundle));
   if (stringBundle)
   {
     nsString v;
-    if (NS_SUCCEEDED(stringBundle->GetStringFromID(stringID, getter_Copies(v))))
+    if (NS_SUCCEEDED(stringBundle->GetStringFromID(stringID, v)))
       return ToNewUTF8String(v);
   }
 
   return strdup("???");
 }
 
 extern "C"
 char *
@@ -1925,17 +1925,17 @@ MimeGetStringByName(const char16_t *stri
   nsCOMPtr<nsIStringBundleService> stringBundleService =
     do_GetService(NS_STRINGBUNDLE_CONTRACTID);
 
   nsCOMPtr<nsIStringBundle> stringBundle;
   stringBundleService->CreateBundle(MIME_URL, getter_AddRefs(stringBundle));
   if (stringBundle)
   {
     nsString v;
-    if (NS_SUCCEEDED(stringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(stringName).get(), getter_Copies(v))))
+    if (NS_SUCCEEDED(stringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(stringName).get(), v)))
       return ToNewUTF8String(v);
   }
 
   return strdup("???");
 }
 
 void
 ResetChannelCharset(MimeObject *obj)
--- a/mailnews/news/src/nsNNTPNewsgroupList.cpp
+++ b/mailnews/news/src/nsNNTPNewsgroupList.cpp
@@ -312,17 +312,17 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDow
     nsCOMPtr<nsIStringBundleService> bundleService =
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = bundle->GetStringFromName("noNewMessages", getter_Copies(statusString));
+    rv = bundle->GetStringFromName("noNewMessages", statusString);
     NS_ENSURE_SUCCESS(rv, rv);
 
     SetProgressStatus(statusString.get());
   }
 
   if (maxextra <= 0 || last_possible < first_possible || last_possible < 1)
   {
     *status=0;
@@ -881,17 +881,17 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int
         mozilla::services::GetStringBundleService();
       NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
       nsCOMPtr<nsIStringBundle> bundle;
       rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
       NS_ENSURE_SUCCESS(rv, rv);
 
       const char16_t *formatStrings[2] = { firstStr.get(), lastStr.get() };
-      rv = bundle->FormatStringFromName("downloadingArticles", formatStrings, 2, getter_Copies(statusString));
+      rv = bundle->FormatStringFromName("downloadingArticles", formatStrings, 2, statusString);
       NS_ENSURE_SUCCESS(rv, rv);
 
       SetProgressStatus(statusString.get());
     }
   }
 
   if (newstatus)
     *newstatus=0;
@@ -1249,17 +1249,17 @@ nsNNTPNewsgroupList::SetProgressStatus(c
       nsCOMPtr<nsIStringBundleService> sbs =
         mozilla::services::GetStringBundleService();
       nsCOMPtr<nsIStringBundle> bundle;
       rv = sbs->CreateBundle(MSGS_URL,
                              getter_AddRefs(bundle));
       NS_ENSURE_SUCCESS_VOID(rv);
       const char16_t *params[] = { accountName.get(), aMessage };
       bundle->FormatStringFromName("statusMessage",
-                                   params, 2, getter_Copies(statusMessage));
+                                   params, 2, statusMessage);
 
       feedback->ShowStatusString(statusMessage);
     }
   }
 }
 
 void
 nsNNTPNewsgroupList::UpdateStatus(bool filtering, int32_t numDLed, int32_t totToDL)
@@ -1291,24 +1291,24 @@ nsNNTPNewsgroupList::UpdateStatus(bool f
     return;
 
   if (filtering)
   {
     NS_ConvertUTF8toUTF16 header(m_filterHeaders[m_currentXHDRIndex]);
     const char16_t *formatStrings[4] = { header.get(),
       numDownloadedStr.get(), totalToDownloadStr.get(), newsgroupName.get() };
     rv = bundle->FormatStringFromName("newNewsgroupFilteringHeaders",
-      formatStrings, 4, getter_Copies(statusString));
+      formatStrings, 4, statusString);
   }
   else
   {
     const char16_t *formatStrings[3] = { numDownloadedStr.get(),
       totalToDownloadStr.get(), newsgroupName.get() };
     rv = bundle->FormatStringFromName("newNewsgroupHeaders",
-      formatStrings, 3, getter_Copies(statusString));
+      formatStrings, 3, statusString);
   }
   if (!NS_SUCCEEDED(rv))
     return;
 
   SetProgressStatus(statusString.get());
   m_lastStatusUpdate = PR_Now();
 
   // only update the progress meter if it has changed
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -1015,17 +1015,17 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI 
       rv = NS_MsgDecodeUnescapeURLPath(group, unescapedName);
       NS_ENSURE_SUCCESS(rv,rv);
 
       bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
       const char16_t *formatStrings[1] = { unescapedName.get() };
 
       rv = bundle->FormatStringFromName(
         "autoSubscribeText", formatStrings, 1,
-        getter_Copies(confirmText));
+        confirmText);
       NS_ENSURE_SUCCESS(rv,rv);
 
       bool confirmResult = false;
       rv = dialog->Confirm(nullptr, confirmText.get(), &confirmResult);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (confirmResult)
       {
@@ -2801,17 +2801,17 @@ nsresult nsNNTPProtocol::ReadNewsList(ns
 
       nsAutoString numGroupsStr;
       numGroupsStr.AppendInt(mNumGroupsListed);
       NS_ConvertASCIItoUTF16 rateStr(rate_buf);
 
       const char16_t *formatStrings[3] = { numGroupsStr.get(), bytesStr.get(), rateStr.get()};
       rv = bundle->FormatStringFromName("bytesReceived",
         formatStrings, 3,
-        getter_Copies(statusString));
+        statusString);
 
       rv = msgStatusFeedback->ShowStatusString(statusString);
       if (NS_FAILED(rv)) {
         PR_Free(lineToFree);
         return rv;
       }
     }
   }
@@ -3367,27 +3367,27 @@ nsresult nsNNTPProtocol::GetNewsStringBy
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
     rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(m_stringBundle));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   if (m_stringBundle) {
-    char16_t *ptrv = nullptr;
-    rv = m_stringBundle->GetStringFromID(stringID, &ptrv);
+    nsAutoString str;
+    rv = m_stringBundle->GetStringFromID(stringID, str);
 
     if (NS_FAILED(rv)) {
       resultString.AssignLiteral("[StringID");
       resultString.AppendInt(stringID);
       resultString.AppendLiteral("?]");
       *aString = ToNewUnicode(resultString);
     }
     else {
-      *aString = ptrv;
+      *aString = ToNewUnicode(str);
     }
   }
   else {
     rv = NS_OK;
     *aString = ToNewUnicode(resultString);
   }
   return rv;
 }
@@ -3403,29 +3403,29 @@ nsresult nsNNTPProtocol::GetNewsStringBy
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
 
     rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(m_stringBundle));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   if (m_stringBundle)
   {
-    char16_t *ptrv = nullptr;
-    rv = m_stringBundle->GetStringFromName(aName, &ptrv);
+    nsAutoString str;
+    rv = m_stringBundle->GetStringFromName(aName, str);
 
     if (NS_FAILED(rv))
     {
       resultString.AssignLiteral("[StringName");
       resultString.Append(NS_ConvertASCIItoUTF16(aName));
       resultString.AppendLiteral("?]");
       *aString = ToNewUnicode(resultString);
     }
     else
     {
-      *aString = ptrv;
+      *aString = ToNewUnicode(str);
     }
   }
   else
   {
     rv = NS_OK;
     *aString = ToNewUnicode(resultString);
   }
   return rv;
@@ -3568,18 +3568,17 @@ nsresult nsNNTPProtocol::DoCancel()
   NS_ENSURE_TRUE(bundleService, NS_ERROR_OUT_OF_MEMORY);
 
   nsCOMPtr<nsIStringBundle> brandBundle;
   bundleService->CreateBundle("chrome://branding/locale/brand.properties",
                               getter_AddRefs(brandBundle));
   NS_ENSURE_TRUE(brandBundle, NS_ERROR_FAILURE);
 
   nsString brandFullName;
-  rv = brandBundle->GetStringFromName("brandFullName",
-                                      getter_Copies(brandFullName));
+  rv = brandBundle->GetStringFromName("brandFullName", brandFullName);
   NS_ENSURE_SUCCESS(rv,rv);
   NS_ConvertUTF16toUTF8 appName(brandFullName);
 
   newsgroups = m_cancelNewsgroups;
   distribution = m_cancelDistribution;
   id = m_cancelID;
   nsCString oldFrom(m_cancelFromHdr);
 
--- a/mailnews/news/src/nsNewsDownloader.cpp
+++ b/mailnews/news/src/nsNewsDownloader.cpp
@@ -193,17 +193,17 @@ bool nsNewsDownloader::GetNextHdrToRetri
     totalStr.AppendInt(int(m_keysToDownload.Length()));
     nsString prettyName;
     nsString statusString;
 
     m_folder->GetPrettyName(prettyName);
 
     const char16_t *formatStrings[3] = { firstStr.get(), totalStr.get(), prettyName.get() };
     rv = bundle->FormatStringFromName("downloadingArticlesForOffline",
-                                      formatStrings, 3, getter_Copies(statusString));
+                                      formatStrings, 3, statusString);
     NS_ENSURE_SUCCESS(rv, false);
     ShowProgress(statusString.get(), percent);
     return true;
   }
   NS_ASSERTION(false, "shouldn't get here if we're not downloading from keys.");
   return false;  // shouldn't get here if we're not downloading from keys.
 }
 
--- a/mailnews/news/src/nsNewsFolder.cpp
+++ b/mailnews/news/src/nsNewsFolder.cpp
@@ -1231,18 +1231,17 @@ nsMsgNewsFolder::GetAuthenticationCreden
       if (!dialog) return NS_ERROR_FAILURE;
     }
 
     NS_ASSERTION(dialog, "We didn't get a net prompt");
     if (dialog)
     {
       // Format the prompt text strings
       nsString promptTitle, promptText;
-      bundle->GetStringFromName("enterUserPassTitle",
-        getter_Copies(promptTitle));
+      bundle->GetStringFromName("enterUserPassTitle", promptTitle);
 
       nsString serverName;
       nsCOMPtr<nsIMsgIncomingServer> server;
       rv = GetServer(getter_AddRefs(server));
       NS_ENSURE_SUCCESS(rv, rv);
 
       server->GetPrettyName(serverName);
 
@@ -1254,21 +1253,21 @@ nsMsgNewsFolder::GetAuthenticationCreden
       nntpServer->GetSingleSignon(&singleSignon);
 
       const char16_t *params[2];
       params[0] = mName.get();
       params[1] = serverName.get();
       if (singleSignon)
         bundle->FormatStringFromName(
           "enterUserPassServer",
-          &params[1], 1, getter_Copies(promptText));
+          &params[1], 1, promptText);
       else
         bundle->FormatStringFromName(
           "enterUserPassGroup",
-          params, 2, getter_Copies(promptText));
+          params, 2, promptText);
 
       // Fill the signon url for the dialog
       nsString signonURL;
       rv = CreateNewsgroupUrlForSignon(nullptr, signonURL);
       NS_ENSURE_SUCCESS(rv, rv);
 
       // Prefill saved username/password
       char16_t *uniGroupUsername = ToNewUnicode(
--- a/mailnews/news/src/nsNntpIncomingServer.cpp
+++ b/mailnews/news/src/nsNntpIncomingServer.cpp
@@ -1577,17 +1577,17 @@ nsNntpIncomingServer::GroupNotFound(nsIM
   NS_ConvertUTF8toUTF16 hostStr(hostname);
 
   nsString groupName(aName);
   const char16_t *formatStrings[2] = { groupName.get(), hostStr.get() };
   nsString confirmText;
   rv = bundle->FormatStringFromName(
                     "autoUnsubscribeText",
                     formatStrings, 2,
-                    getter_Copies(confirmText));
+                    confirmText);
   NS_ENSURE_SUCCESS(rv,rv);
 
   bool confirmResult = false;
   rv = prompt->Confirm(nullptr, confirmText.get(), &confirmResult);
   NS_ENSURE_SUCCESS(rv,rv);
 
   if (confirmResult) {
     rv = Unsubscribe(groupName.get());
--- a/suite/shell/src/nsGNOMEShellService.cpp
+++ b/suite/shell/src/nsGNOMEShellService.cpp
@@ -89,18 +89,17 @@ GetBrandName(nsACString& aBrandName)
   nsCOMPtr<nsIStringBundleService> bundleService(do_GetService("@mozilla.org/intl/stringbundle;1", &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIStringBundle> brandBundle;
   rv = bundleService->CreateBundle(BRAND_PROPERTIES, getter_AddRefs(brandBundle));
   NS_ENSURE_TRUE(brandBundle, rv);
 
   nsString brandName;
-  rv = brandBundle->GetStringFromName("brandShortName",
-                                      getter_Copies(brandName));
+  rv = brandBundle->GetStringFromName("brandShortName", brandName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   CopyUTF16toUTF8(brandName, aBrandName);
   return rv;
 }
 
 nsresult
 nsGNOMEShellService::Init()
--- a/suite/shell/src/nsWindowsShellService.cpp
+++ b/suite/shell/src/nsWindowsShellService.cpp
@@ -776,18 +776,17 @@ nsWindowsShellService::SetDesktopBackgro
   nsCOMPtr<nsIStringBundle> shellBundle;
   rv = bundleService->CreateBundle(SHELLSERVICE_PROPERTIES,
                                    getter_AddRefs(shellBundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // e.g. "Desktop Background.bmp"
   nsString fileLeafName;
   rv = shellBundle->GetStringFromName
-                      ("desktopBackgroundLeafNameWin",
-                       getter_Copies(fileLeafName));
+                      ("desktopBackgroundLeafNameWin", fileLeafName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // get the profile root directory
   nsCOMPtr<nsIFile> file;
   rv = NS_GetSpecialDirectory(NS_APP_APPLICATION_REGISTRY_DIR,
                               getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv, rv);