Bug 952431 - Replace a bunch of NS_LITERAL_STRING uses with MOZ_UTF16. r=Neil
authorSuyash Agarwal <syshagarwal@gmail.com>
Thu, 02 Jan 2014 15:29:05 -0500
changeset 17122 25f9d632291219c19d58c3633c34d2d454af0ba8
parent 17121 e304453cd7c7e2deaa53e528b5b9d422c07c39e0
child 17123 15eac4288d80d669d8db2763b018f30767feceb9
push id1103
push usermbanner@mozilla.com
push dateTue, 18 Mar 2014 07:44:06 +0000
treeherdercomm-beta@50c6279a0af0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs952431
Bug 952431 - Replace a bunch of NS_LITERAL_STRING uses with MOZ_UTF16. r=Neil
mail/components/shell/nsMailGNOMEIntegration.cpp
mailnews/addrbook/src/nsAbCardProperty.cpp
mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
mailnews/addrbook/src/nsAbLDAPDirectory.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/nsMsgSearchAdapter.cpp
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/nsMsgFolderDataSource.cpp
mailnews/base/src/nsMsgGroupView.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgStatusFeedback.cpp
mailnews/base/src/nsMsgWindow.cpp
mailnews/base/src/nsSpamSettings.cpp
mailnews/base/src/nsSubscribableServer.cpp
mailnews/base/src/nsSubscribeDataSource.cpp
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/base/util/nsMsgI18N.cpp
mailnews/base/util/nsMsgIncomingServer.cpp
mailnews/base/util/nsMsgUtils.cpp
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/src/nsMsgComposeService.cpp
mailnews/compose/src/nsMsgPrompts.cpp
mailnews/compose/src/nsMsgSend.cpp
mailnews/compose/src/nsSmtpProtocol.cpp
mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
mailnews/imap/src/nsIMAPBodyShell.cpp
mailnews/imap/src/nsImapIncomingServer.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapService.cpp
mailnews/import/eudora/src/nsEudoraFilters.cpp
mailnews/import/src/nsImportMail.cpp
mailnews/local/src/nsLocalMailFolder.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/mimemsg.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
--- a/mail/components/shell/nsMailGNOMEIntegration.cpp
+++ b/mail/components/shell/nsMailGNOMEIntegration.cpp
@@ -292,17 +292,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(NS_LITERAL_STRING("brandShortName").get(),
+    brandBundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                    getter_Copies(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
@@ -680,29 +680,29 @@ nsresult nsAbCardProperty::ConvertToEsca
     if (NS_SUCCEEDED(rv) && !str.IsEmpty())
     {
         myAddPropValue(vObj, VCNoteProp, str.get(), &vCardHasData);
     }
 
     uint32_t format;
     rv = GetPropertyAsUint32(kPreferMailFormatProperty, &format);
     if (NS_SUCCEEDED(rv) && format == nsIAbPreferMailFormat::html) {
-        myAddPropValue(vObj, VCUseHTML, NS_LITERAL_STRING("TRUE").get(), &vCardHasData);
+        myAddPropValue(vObj, VCUseHTML, MOZ_UTF16("TRUE"), &vCardHasData);
     }
     else if (NS_SUCCEEDED(rv) && format == nsIAbPreferMailFormat::plaintext) {
-        myAddPropValue(vObj, VCUseHTML, NS_LITERAL_STRING("FALSE").get(), &vCardHasData);
+        myAddPropValue(vObj, VCUseHTML, MOZ_UTF16("FALSE"), &vCardHasData);
     }
 
     rv = GetPropertyAsAString(kWorkWebPageProperty, str);
     if (NS_SUCCEEDED(rv) && !str.IsEmpty())
     {
         myAddPropValue(vObj, VCURLProp, str.get(), &vCardHasData);
     }
 
-    myAddPropValue(vObj, VCVersionProp, NS_LITERAL_STRING("2.1").get(), nullptr);
+    myAddPropValue(vObj, VCVersionProp, MOZ_UTF16("2.1"), nullptr);
 
     if (!vCardHasData) {
         aResult.Truncate();
         return NS_OK;
     }
 
     int len = 0;
     char *vCard = writeMemVObject(0, &len, vObj);
@@ -727,17 +727,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(NS_LITERAL_STRING("addressBook").get(), getter_Copies(addrBook));
+      rv = bundle->GetStringFromName(MOZ_UTF16("addressBook"), getter_Copies(addrBook));
       if (NS_SUCCEEDED(rv)) {
         xmlStr.AppendLiteral("<title xmlns=\"http://www.w3.org/1999/xhtml\">");
         xmlStr.Append(addrBook);
         xmlStr.AppendLiteral("</title>\n");
       }
     }
   }
 
@@ -819,17 +819,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(NS_LITERAL_STRING("headingAddresses").get(), getter_Copies(headingAddresses));
+    rv = bundle->GetStringFromName(MOZ_UTF16("headingAddresses"), getter_Copies(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);
 
@@ -1041,28 +1041,28 @@ nsresult nsAbCardProperty::AppendCitySta
 
   rv = AppendLine(item, aConv, zipResult);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsString formattedString;
 
   if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty()) {
     const PRUnichar *formatStrings[] = { cityResult.get(), stateResult.get(), zipResult.get() };
-    rv = aBundle->FormatStringFromName(NS_LITERAL_STRING("cityAndStateAndZip").get(), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
+    rv = aBundle->FormatStringFromName(MOZ_UTF16("cityAndStateAndZip"), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else if (!cityResult.IsEmpty() && !stateResult.IsEmpty() && zipResult.IsEmpty()) {
     const PRUnichar *formatStrings[] = { cityResult.get(), stateResult.get() };
-    rv = aBundle->FormatStringFromName(NS_LITERAL_STRING("cityAndStateNoZip").get(), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
+    rv = aBundle->FormatStringFromName(MOZ_UTF16("cityAndStateNoZip"), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else if ((!cityResult.IsEmpty() && stateResult.IsEmpty() && !zipResult.IsEmpty()) ||
           (cityResult.IsEmpty() && !stateResult.IsEmpty() && !zipResult.IsEmpty())) {
     const PRUnichar *formatStrings[] = { cityResult.IsEmpty() ? stateResult.get() : cityResult.get(), zipResult.get() };
-    rv = aBundle->FormatStringFromName(NS_LITERAL_STRING("cityOrStateAndZip").get(), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
+    rv = aBundle->FormatStringFromName(MOZ_UTF16("cityOrStateAndZip"), formatStrings, ArrayLength(formatStrings), getter_Copies(formattedString));
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else {
     if (!cityResult.IsEmpty())
       formattedString = cityResult;
     else if (!stateResult.IsEmpty())
       formattedString = stateResult;
     else
@@ -1106,23 +1106,23 @@ NS_IMETHODIMP nsAbCardProperty::Generate
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
     nsString result;
 
     if (aGenerateFormat == GENERATE_LAST_FIRST_ORDER) {
       const PRUnichar *stringParams[2] = {lastName.get(), firstName.get()};
 
-      rv = bundle->FormatStringFromName(NS_LITERAL_STRING("lastFirstFormat").get(),
+      rv = bundle->FormatStringFromName(MOZ_UTF16("lastFirstFormat"),
                                         stringParams, 2, getter_Copies(result));
     }
     else {
       const PRUnichar *stringParams[2] = {firstName.get(), lastName.get()};
-        
-      rv = bundle->FormatStringFromName(NS_LITERAL_STRING("firstLastFormat").get(),
+
+      rv = bundle->FormatStringFromName(MOZ_UTF16("firstLastFormat"),
                                         stringParams, 2, getter_Copies(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(NS_LITERAL_STRING("AuthDlgTitle").get(), getter_Copies(title));
+    rv = bundle->GetStringFromName(MOZ_UTF16("AuthDlgTitle"), getter_Copies(title));
     if (NS_FAILED (rv)) 
         return rv ;
 
     nsString desc;
-    rv = bundle->GetStringFromName(NS_LITERAL_STRING("AuthDlgDesc").get(), getter_Copies(desc));
+    rv = bundle->GetStringFromName(MOZ_UTF16("AuthDlgDesc"), getter_Copies(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/nsAbLDAPDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
@@ -251,18 +251,18 @@ NS_IMETHODIMP nsAbLDAPDirectory::SetLDAP
   {
     // They don't so its time to send round an update.
     nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // We inherit from nsIAbDirectory, so this static cast should be safe.
     abManager->NotifyItemPropertyChanged(static_cast<nsIAbDirectory*>(this),
       "IsSecure",
-      (newIsNotSecure ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false")).get(),
-      (newIsNotSecure ? NS_LITERAL_STRING("false") : NS_LITERAL_STRING("true")).get());
+      (newIsNotSecure ? MOZ_UTF16("true") : MOZ_UTF16("false")),
+      (newIsNotSecure ? MOZ_UTF16("false") : MOZ_UTF16("true")));
   }
 
   return NS_OK;
 }
 
 /* 
  *
  * nsIAbDirectorySearch methods
--- a/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
@@ -95,17 +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(NS_LITERAL_STRING("authPromptTitle").get(),
+    rv = ldapBundle->GetStringFromName(MOZ_UTF16("authPromptTitle"),
                                        getter_Copies(authPromptTitle));
     if (NS_FAILED(rv))
     {
       NS_ERROR("nsAbLDAPListenerBase::OnLDAPInit(): error getting"
                "'authPromptTitle' string from bundle "
                "chrome://mozldap/locale/ldap.properties");
       InitFailed();
       return rv;
@@ -128,17 +128,17 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLD
     // which is the default compiler for Mozilla on linux at the moment.
     //
     NS_ConvertASCIItoUTF16 hostTemp(host);
     const PRUnichar *hostArray[1] = { hostTemp.get() };
 
     // format the hostname into the authprompt text string
     //
     nsString authPromptText;
-    rv = ldapBundle->FormatStringFromName(NS_LITERAL_STRING("authPromptText").get(),
+    rv = ldapBundle->FormatStringFromName(MOZ_UTF16("authPromptText"),
                                           hostArray,
                                           sizeof(hostArray) / sizeof(const PRUnichar *),
                                           getter_Copies(authPromptText));
     if (NS_FAILED(rv))
     {
       NS_ERROR("nsAbLDAPListenerBase::OnLDAPInit():"
                "error getting 'authPromptText' string from bundle "
                "chrome://mozldap/locale/ldap.properties");
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -504,36 +504,36 @@ NS_IMETHODIMP nsAbManager::ExportAddress
   nsCOMPtr<nsIStringBundleService> bundleService =
     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));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString title;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("ExportAddressBookTitle").get(), getter_Copies(title));
+  rv = bundle->GetStringFromName(MOZ_UTF16("ExportAddressBookTitle"), getter_Copies(title));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = filePicker->Init(aParentWin, title, nsIFilePicker::modeSave);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString filterString;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("LDIFFiles").get(), getter_Copies(filterString));
+  rv = bundle->GetStringFromName(MOZ_UTF16("LDIFFiles"), getter_Copies(filterString));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.ldi; *.ldif"));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("CSVFiles").get(), getter_Copies(filterString));
+  rv = bundle->GetStringFromName(MOZ_UTF16("CSVFiles"), getter_Copies(filterString));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.csv"));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("TABFiles").get(), getter_Copies(filterString));
+  rv = bundle->GetStringFromName(MOZ_UTF16("TABFiles"), getter_Copies(filterString));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = filePicker->AppendFilter(filterString, NS_LITERAL_STRING("*.tab; *.txt"));
   NS_ENSURE_SUCCESS(rv, rv);
 
   int16_t dialogResult;
   filePicker->Show(&dialogResult);
 
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -409,17 +409,17 @@ nsresult nsAbView::GetCardValue(nsIAbCar
   // else, standard column (like PrimaryEmail and _AimScreenName)
   if (colID[0] == PRUnichar('G'))
     return card->GenerateName(mGeneratedNameFormat, mABBundle, _retval);
 
   if (colID[0] == PRUnichar('_') && colID[1] == PRUnichar('P'))
     // Use LN/FN order for the phonetic name
     return card->GeneratePhoneticName(true, _retval);
 
-  if (!NS_strcmp(colID, NS_LITERAL_STRING("ChatName").get()))
+  if (!NS_strcmp(colID, MOZ_UTF16("ChatName")))
     return card->GenerateChatName(_retval);
 
   nsresult rv = card->GetPropertyAsAString(NS_ConvertUTF16toUTF8(colID).get(), _retval);
   if (rv == NS_ERROR_NOT_AVAILABLE) {
     rv = NS_OK;
     _retval.Truncate();
   }
   return rv;
@@ -604,17 +604,17 @@ inplaceSortCallback(const void *data1, c
       return closure->abView->CompareCollationKeys(card1->secondaryCollationKey,card1->secondaryCollationKeyLen,card2->secondaryCollationKey,card2->secondaryCollationKeyLen) * (closure->factor);
   }
 }
 
 static void SetSortClosure(const PRUnichar *sortColumn, const PRUnichar *sortDirection, nsAbView *abView, SortClosure *closure)
 {
   closure->colID = sortColumn;
   
-  if (sortDirection && !NS_strcmp(sortDirection, NS_LITERAL_STRING("descending").get()))
+  if (sortDirection && !NS_strcmp(sortDirection, MOZ_UTF16("descending")))
     closure->factor = DESCENDING_SORT_FACTOR;
   else 
     closure->factor = ASCENDING_SORT_FACTOR;
 
   closure->abView = abView;
   return;
 }
 
@@ -659,17 +659,17 @@ NS_IMETHODIMP nsAbView::SortBy(const PRU
       AbCard *abcard = (AbCard *)(mCards.ElementAt(i));
 
       rv = GenerateCollationKeysForCard(sortColumn.get(), abcard);
       NS_ENSURE_SUCCESS(rv,rv);
     }
 
     nsAutoString sortDirection;
     if (!sortDir)
-      sortDirection = NS_LITERAL_STRING("ascending").get();  // default direction
+      sortDirection = NS_LITERAL_STRING("ascending");  // default direction
     else
       sortDirection = sortDir;
 
     SortClosure closure;
     SetSortClosure(sortColumn.get(), sortDirection.get(), this, &closure);
     
     nsCOMPtr<nsIMutableArray> selectedCards = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1205,18 +1205,18 @@ NS_IMETHODIMP nsAbView::SwapFirstNameLas
           {
             nsString dnLnFn;
             nsString dnFnLn;
             const PRUnichar *nameString[2];
             const PRUnichar *formatString;
 
             // The format should stays the same before/after we swap the names
             formatString = displayNameLastnamefirst ?
-                              NS_LITERAL_STRING("lastFirstFormat").get() :
-                              NS_LITERAL_STRING("firstLastFormat").get();
+                              MOZ_UTF16("lastFirstFormat") :
+                              MOZ_UTF16("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));
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -235,17 +235,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(NS_LITERAL_STRING("addressBook").get(), getter_Copies(addrBook));
+      rv = bundle->GetStringFromName(MOZ_UTF16("addressBook"), getter_Copies(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
@@ -427,25 +427,25 @@ nsresult nsAddrDatabase::DisplayAlert(co
   NS_ENSURE_SUCCESS(rv, rv);
 
   return prompter->Alert(nullptr /* we don't know the parent window */, alertTitle.get(), alertMessage.get());
 }
 
 nsresult nsAddrDatabase::AlertAboutCorruptMabFile(const PRUnichar *aOldFileName, const PRUnichar *aNewFileName)
 {
   const PRUnichar *formatStrings[] = { aOldFileName, aOldFileName, aNewFileName };
-  return DisplayAlert(NS_LITERAL_STRING("corruptMabFileTitle").get(),
-    NS_LITERAL_STRING("corruptMabFileAlert").get(), formatStrings, 3);
+  return DisplayAlert(MOZ_UTF16("corruptMabFileTitle"),
+    MOZ_UTF16("corruptMabFileAlert"), formatStrings, 3);
 }
 
 nsresult nsAddrDatabase::AlertAboutLockedMabFile(const PRUnichar *aFileName)
 {
   const PRUnichar *formatStrings[] = { aFileName };
-  return DisplayAlert(NS_LITERAL_STRING("lockedMabFileTitle").get(),
-    NS_LITERAL_STRING("lockedMabFileAlert").get(), formatStrings, 1);
+  return DisplayAlert(MOZ_UTF16("lockedMabFileTitle"),
+    MOZ_UTF16("lockedMabFileAlert"), formatStrings, 1);
 }
 
 nsresult
 nsAddrDatabase::OpenInternal(nsIFile *aMabFile, bool aCreate, nsIAddrDatabase** pAddrDB)
 {
   nsAddrDatabase *pAddressBookDB = new nsAddrDatabase();
   if (!pAddressBookDB) {
     return NS_ERROR_OUT_OF_MEMORY;
--- a/mailnews/base/search/src/nsMsgFilter.cpp
+++ b/mailnews/base/search/src/nsMsgFilter.cpp
@@ -531,17 +531,17 @@ NS_IMETHODIMP nsMsgFilter::LogRuleHit(ns
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://messenger/locale/filter.properties",
       getter_AddRefs(bundle));
     NS_ENSURE_SUCCESS(rv, rv);
 
     const PRUnichar *filterLogDetectFormatStrings[4] = { filterName.get(), authorValue.get(), subjectValue.get(), dateValue.get() };
     nsString filterLogDetectStr;
     rv = bundle->FormatStringFromName(
-      NS_LITERAL_STRING("filterLogDetectStr").get(),
+      MOZ_UTF16("filterLogDetectStr"),
       filterLogDetectFormatStrings, 4,
       getter_Copies(filterLogDetectStr));
     NS_ENSURE_SUCCESS(rv, rv);
 
     buffer += NS_ConvertUTF16toUTF8(filterLogDetectStr);
     buffer +=  "\n";
 
     if (actionType == nsMsgFilterAction::MoveToFolder ||
@@ -554,34 +554,33 @@ NS_IMETHODIMP nsMsgFilter::LogRuleHit(ns
       nsCString msgId;
       aMsgHdr->GetMessageId(getter_Copies(msgId));
       NS_ConvertASCIItoUTF16 msgIdValue(msgId);
 
       const PRUnichar *logMoveFormatStrings[2] = { msgIdValue.get(), actionFolderUriValue.get() };
       nsString logMoveStr;
       rv = bundle->FormatStringFromName(
         (actionType == nsMsgFilterAction::MoveToFolder) ?
-          NS_LITERAL_STRING("logMoveStr").get() :
-          NS_LITERAL_STRING("logCopyStr").get(),
+          MOZ_UTF16("logMoveStr") : MOZ_UTF16("logCopyStr"),
         logMoveFormatStrings, 2,
         getter_Copies(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(
-                  NS_LITERAL_STRING("filterMissingCustomAction").get(),
+                  MOZ_UTF16("filterMissingCustomAction"),
                   getter_Copies(filterActionName));
       buffer += NS_ConvertUTF16toUTF8(filterActionName);
     }
     else
     {
       nsString actionValue;
       nsAutoString filterActionID;
       filterActionID = NS_LITERAL_STRING("filterAction");
--- a/mailnews/base/search/src/nsMsgFilterService.cpp
+++ b/mailnews/base/search/src/nsMsgFilterService.cpp
@@ -1054,17 +1054,17 @@ bool nsMsgFilterAfterTheFact::ContinueEx
   nsString filterName;
   m_curFilter->GetFilterName(filterName);
   nsString formatString;
   nsString confirmText;
   const PRUnichar *formatStrings[] =
   {
     filterName.get()
   };
-  nsresult rv = bundle->FormatStringFromName(NS_LITERAL_STRING("continueFilterExecution").get(),
+  nsresult rv = bundle->FormatStringFromName(MOZ_UTF16("continueFilterExecution"),
                                              formatStrings, 1, getter_Copies(confirmText));
   if (NS_FAILED(rv))
     return false;
   bool returnVal = false;
   (void) DisplayConfirmationPrompt(m_msgWindow, confirmText.get(), &returnVal);
   return returnVal;
 }
 
--- a/mailnews/base/search/src/nsMsgSearchAdapter.cpp
+++ b/mailnews/base/search/src/nsMsgSearchAdapter.cpp
@@ -149,17 +149,17 @@ NS_IMETHODIMP nsMsgSearchAdapter::AddHit
 
 
 char *
 nsMsgSearchAdapter::GetImapCharsetParam(const PRUnichar *destCharset)
 {
   char *result = nullptr;
 
   // Specify a character set unless we happen to be US-ASCII.
-  if (NS_strcmp(destCharset, NS_LITERAL_STRING("us-ascii").get()))
+  if (NS_strcmp(destCharset, MOZ_UTF16("us-ascii")))
       result = PR_smprintf("%s%s", nsMsgSearchAdapter::m_kImapCharset, NS_ConvertUTF16toUTF8(destCharset).get());
 
   return result;
 }
 
 /*
    09/21/2000 - taka@netscape.com
    This method is bogus. Escape must be done against char * not PRUnichar *
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -251,18 +251,18 @@ NS_IMETHODIMP nsMessenger::SetWindow(nsI
 
     nsCOMPtr<nsIDocShellTreeItem> rootDocShellAsItem;
     docShellAsItem->GetSameTypeRootTreeItem(getter_AddRefs(rootDocShellAsItem));
 
     nsCOMPtr<nsIDocShellTreeNode> rootDocShellAsNode(do_QueryInterface(rootDocShellAsItem));
     if (rootDocShellAsNode)
     {
       nsCOMPtr<nsIDocShellTreeItem> childAsItem;
-      rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
-                                                 true, false, nullptr, nullptr, getter_AddRefs(childAsItem));
+      rv = rootDocShellAsNode->FindChildWithName(MOZ_UTF16("messagepane"), true, false,
+                                                 nullptr, nullptr, getter_AddRefs(childAsItem));
 
       mDocShell = do_QueryInterface(childAsItem);
       if (NS_SUCCEEDED(rv) && mDocShell) {
         mCurrentDisplayCharset = ""; // Important! Clear out mCurrentDisplayCharset so we reset a default charset on mDocshell the next time we try to load something into it.
 
         if (aMsgWindow)
           aMsgWindow->GetTransactionManager(getter_AddRefs(mTxnMgr));
       }
@@ -329,17 +329,17 @@ nsMessenger::PromptIfFileExists(nsIFile 
     file->GetPath(path);
     const PRUnichar *pathFormatStrings[] = { path.get() };
 
     if (!mStringBundle)
     {
       rv = InitStringBundle();
       NS_ENSURE_SUCCESS(rv, rv);
     }
-    rv = mStringBundle->FormatStringFromName(NS_LITERAL_STRING("fileExists").get(),
+    rv = mStringBundle->FormatStringFromName(MOZ_UTF16("fileExists"),
                                              pathFormatStrings, 1,
                                              getter_Copies(errorMessage));
     NS_ENSURE_SUCCESS(rv, rv);
     rv = dialog->Confirm(nullptr, errorMessage.get(), &dialogResult);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (dialogResult)
     {
@@ -2961,17 +2961,17 @@ nsMessenger::PromptIfDeleteAttachments(b
     attachmentList.Append(displayString);
     attachmentList.Append(PRUnichar('\n'));
   }
   const PRUnichar *formatStrings[] = { attachmentList.get() };
 
   // format the message and display
   nsString promptMessage;
   const PRUnichar * propertyName = aSaveFirst ?
-    NS_LITERAL_STRING("detachAttachments").get() : NS_LITERAL_STRING("deleteAttachments").get();
+    MOZ_UTF16("detachAttachments") : MOZ_UTF16("deleteAttachments");
   rv = mStringBundle->FormatStringFromName(propertyName, formatStrings, 1,getter_Copies(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
@@ -328,28 +328,28 @@ nsMessengerOSXIntegration::FillToolTipIn
       nsCString uri;
       aFolder->GetURI(uri);
 
       if (numNotDisplayed > 0)
       {
         nsAutoString numNotDisplayedText;
         numNotDisplayedText.AppendInt(numNotDisplayed);
         const PRUnichar *formatStrings[3] = { numNewMsgsText.get(), authors.get(), numNotDisplayedText.get() };
-        bundle->FormatStringFromName(NS_LITERAL_STRING("macBiffNotification_messages_extra").get(),
+        bundle->FormatStringFromName(MOZ_UTF16("macBiffNotification_messages_extra"),
                                      formatStrings,
                                      3,
                                      getter_Copies(finalText));
       }
       else
       {
         const PRUnichar *formatStrings[2] = { numNewMsgsText.get(), authors.get() };
 
         if (aNewCount == 1)
         {
-          bundle->FormatStringFromName(NS_LITERAL_STRING("macBiffNotification_message").get(),
+          bundle->FormatStringFromName(MOZ_UTF16("macBiffNotification_message"),
                                        formatStrings,
                                        2,
                                        getter_Copies(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)
           {
@@ -363,17 +363,17 @@ nsMessengerOSXIntegration::FillToolTipIn
                                        getter_AddRefs(hdr));
               if (NS_SUCCEEDED(rv) && hdr)
                 aFolder->GetUriForMsg(hdr, uri);
             }
             NS_Free(newMessageKeys);
           }
         }
         else
-          bundle->FormatStringFromName(NS_LITERAL_STRING("macBiffNotification_messages").get(),
+          bundle->FormatStringFromName(MOZ_UTF16("macBiffNotification_messages"),
                                        formatStrings,
                                        2,
                                        getter_Copies(finalText));
       }
       ShowAlertMessage(accountName, finalText, uri);
     } // if we got a bundle
   } // if we got a folder
 }
@@ -487,17 +487,17 @@ nsMessengerOSXIntegration::BounceDockIco
 
   if (!bounceDockIcon)
     return NS_OK;
 
   nsCOMPtr<nsIWindowMediator> mediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
   if (mediator)
   {
     nsCOMPtr<nsIDOMWindow> domWindow;
-    mediator->GetMostRecentWindow(NS_LITERAL_STRING("mail:3pane").get(), getter_AddRefs(domWindow));
+    mediator->GetMostRecentWindow(MOZ_UTF16("mail:3pane"), getter_AddRefs(domWindow));
     if (domWindow)
     {
       nsCOMPtr<nsIDOMChromeWindow> chromeWindow(do_QueryInterface(domWindow));
       chromeWindow->GetAttention();
     }
   }
   return NS_OK;
 }
@@ -626,17 +626,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(NS_LITERAL_STRING("macBiffNotification_separator").get(), getter_Copies(listSeparator));
+      bundle->GetStringFromName(MOZ_UTF16("macBiffNotification_separator"), getter_Copies(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
@@ -168,18 +168,18 @@ nsMessengerUnixIntegration::BuildNotific
   numNewMsgsText.AppendInt(numNewMessages);
 
   const PRUnichar *formatStrings[] =
   {
     accountName.get(), numNewMsgsText.get()
   };
 
   aBundle->FormatStringFromName(numNewMessages == 1 ?
-                                  NS_LITERAL_STRING("newMailNotification_message").get() :
-                                  NS_LITERAL_STRING("newMailNotification_messages").get(),
+                                  MOZ_UTF16("newMailNotification_message") :
+                                  MOZ_UTF16("newMailNotification_messages"),
                                 formatStrings, 2, getter_Copies(aTitle));
   return true;
 }
 
 /* This comparator lets us sort an nsCOMArray of nsIMsgDBHdr's by
  * their dateInSeconds attributes in ascending order.
  */
 static int
@@ -287,17 +287,17 @@ nsMessengerUnixIntegration::BuildNotific
 
   if (showSubject && showSender)
   {
     nsString msgTitle;
     const PRUnichar *formatStrings[] =
     {
       subject.get(), author.get()
     };
-    aBundle->FormatStringFromName(NS_LITERAL_STRING("newMailNotification_messagetitle").get(),
+    aBundle->FormatStringFromName(MOZ_UTF16("newMailNotification_messagetitle"),
         formatStrings, 2, getter_Copies(msgTitle));
     alertBody.Append(msgTitle);
   }
   else if (showSubject)
     alertBody.Append(subject);
   else if (showSender)
     alertBody.Append(author);
 
--- a/mailnews/base/src/nsMessengerWinIntegration.cpp
+++ b/mailnews/base/src/nsMessengerWinIntegration.cpp
@@ -726,19 +726,19 @@ void nsMessengerWinIntegration::FillTool
 
         const PRUnichar *formatStrings[] =
         {
           numNewMsgsText.get(),
         };
 
         nsString finalText;
         if (numNewMessages == 1)
-          bundle->FormatStringFromName(NS_LITERAL_STRING("biffNotification_message").get(), formatStrings, 1, getter_Copies(finalText));
+          bundle->FormatStringFromName(MOZ_UTF16("biffNotification_message"), formatStrings, 1, getter_Copies(finalText));
         else
-          bundle->FormatStringFromName(NS_LITERAL_STRING("biffNotification_messages").get(), formatStrings, 1, getter_Copies(finalText));
+          bundle->FormatStringFromName(MOZ_UTF16("biffNotification_messages"), formatStrings, 1, getter_Copies(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
@@ -2357,17 +2357,17 @@ nsresult nsMsgAccountManager::GetLocalFo
     mozilla::services::GetStringBundleService();
   NS_ENSURE_TRUE(sBundleService, NS_ERROR_UNEXPECTED);
 
   if (sBundleService)
     rv = sBundleService->CreateBundle("chrome://messenger/locale/messenger.properties",
                                       getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return bundle->GetStringFromName(NS_LITERAL_STRING("localFolders").get(), getter_Copies(localFoldersName));
+  return bundle->GetStringFromName(MOZ_UTF16("localFolders"), getter_Copies(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
@@ -149,17 +149,17 @@ nsMsgAccountManagerDataSource::nsMsgAcco
     getRDFService()->GetResource(NS_LITERAL_CSTRING(NC_RDF_PAGETITLE_SMTP),
                                  &kNC_PageTitleSMTP);
     getRDFService()->GetResource(NS_LITERAL_CSTRING(NC_RDF_PAGETITLE_JUNK),
                                  &kNC_PageTitleJunk);
 
     getRDFService()->GetResource(NS_LITERAL_CSTRING(NC_RDF_ACCOUNTROOT),
                                  &kNC_AccountRoot);
 
-    getRDFService()->GetLiteral(NS_LITERAL_STRING("true").get(),
+    getRDFService()->GetLiteral(MOZ_UTF16("true"),
                                 &kTrueLiteral);
 
     // eventually these need to exist in some kind of array
     // that's easily extensible
     getRDFService()->GetResource(NS_LITERAL_CSTRING(NC_RDF_SETTINGS), &kNC_Settings);
 
     kDefaultServerAtom = MsgNewAtom("DefaultServer").get();
   }
@@ -276,36 +276,36 @@ 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(NS_LITERAL_STRING("prefPanel-server").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-server"),
                                        getter_Copies(pageTitle));
 
     else if (source == kNC_PageTitleCopies)
-      mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-copies").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-copies"),
                                        getter_Copies(pageTitle));
     else if (source == kNC_PageTitleSynchronization)
-      mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-synchronization").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-synchronization"),
                                        getter_Copies(pageTitle));
     else if (source == kNC_PageTitleDiskSpace)
-      mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-diskspace").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-diskspace"),
                                        getter_Copies(pageTitle));
     else if (source == kNC_PageTitleAddressing)
-      mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-addressing").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-addressing"),
                                        getter_Copies(pageTitle));
     else if (source == kNC_PageTitleSMTP)
-      mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-smtp").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-smtp"),
                                        getter_Copies(pageTitle));
     else if (source == kNC_PageTitleJunk)
-      mStringBundle->GetStringFromName(NS_LITERAL_STRING("prefPanel-junk").get(),
+      mStringBundle->GetStringFromName(MOZ_UTF16("prefPanel-junk"),
                                        getter_Copies(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);
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -151,26 +151,26 @@ nsMsgDBView::nsMsgDBView()
 }
 
 void nsMsgDBView::InitializeAtomsAndLiterals()
 {
   kJunkMsgAtom = MsgNewAtom("junk").get();
   kNotJunkMsgAtom = MsgNewAtom("notjunk").get();
 
   // priority strings
-  kHighestPriorityString = GetString(NS_LITERAL_STRING("priorityHighest").get());
-  kHighPriorityString = GetString(NS_LITERAL_STRING("priorityHigh").get());
-  kLowestPriorityString = GetString(NS_LITERAL_STRING("priorityLowest").get());
-  kLowPriorityString = GetString(NS_LITERAL_STRING("priorityLow").get());
-  kNormalPriorityString = GetString(NS_LITERAL_STRING("priorityNormal").get());
-
-  kReadString = GetString(NS_LITERAL_STRING("read").get());
-  kRepliedString = GetString(NS_LITERAL_STRING("replied").get());
-  kForwardedString = GetString(NS_LITERAL_STRING("forwarded").get());
-  kNewString = GetString(NS_LITERAL_STRING("new").get());
+  kHighestPriorityString = GetString(MOZ_UTF16("priorityHighest"));
+  kHighPriorityString = GetString(MOZ_UTF16("priorityHigh"));
+  kLowestPriorityString = GetString(MOZ_UTF16("priorityLowest"));
+  kLowPriorityString = GetString(MOZ_UTF16("priorityLow"));
+  kNormalPriorityString = GetString(MOZ_UTF16("priorityNormal"));
+
+  kReadString = GetString(MOZ_UTF16("read"));
+  kRepliedString = GetString(MOZ_UTF16("replied"));
+  kForwardedString = GetString(MOZ_UTF16("forwarded"));
+  kNewString = GetString(MOZ_UTF16("new"));
 }
 
 nsMsgDBView::~nsMsgDBView()
 {
   if (m_db)
     m_db->RemoveListener(this);
 
   gInstanceCount--;
@@ -1689,24 +1689,24 @@ NS_IMETHODIMP nsMsgDBView::GetCellValue(
   aValue.Truncate();
   // provide a string "value" for cells that do not normally have text.
   // use empty string for the normal states "Read", "Not Starred", "No Attachment" and "Not Junk"
   switch (colID[0])
   {
     case 'a': // attachment column
       if (flags & nsMsgMessageFlags::Attachment) {
         nsString tmp_str;
-        tmp_str.Adopt(GetString(NS_LITERAL_STRING("messageHasAttachment").get()));
+        tmp_str.Adopt(GetString(MOZ_UTF16("messageHasAttachment")));
         aValue.Assign(tmp_str);
       }
       break;
     case 'f': // flagged (starred) column
       if (flags & nsMsgMessageFlags::Marked) {
         nsString tmp_str;
-        tmp_str.Adopt(GetString(NS_LITERAL_STRING("messageHasFlag").get()));
+        tmp_str.Adopt(GetString(MOZ_UTF16("messageHasFlag")));
         aValue.Assign(tmp_str);
       }
       break;
     case 'j': // junk column
       if (JunkControlsEnabled(aRow))
       {
         nsCString junkScoreStr;
         msgHdr->GetStringProperty("junkscore", getter_Copies(junkScoreStr));
@@ -1728,27 +1728,27 @@ NS_IMETHODIMP nsMsgDBView::GetCellValue(
         {
           IsContainerEmpty(aRow, &isContainerEmpty);
           if (!isContainerEmpty)
           {
             nsString tmp_str;
 
             IsContainerOpen(aRow, &isContainerOpen);
             tmp_str.Adopt(GetString(isContainerOpen ?
-                                   NS_LITERAL_STRING("messageExpanded").get() :
-                                   NS_LITERAL_STRING("messageCollapsed").get()));
+                            MOZ_UTF16("messageExpanded") :
+                            MOZ_UTF16("messageCollapsed")));
             aValue.Assign(tmp_str);
           }
         }
       }
       break;
     case 'u': // read/unread column
       if (!(flags & nsMsgMessageFlags::Read)) {
         nsString tmp_str;
-        tmp_str.Adopt(GetString(NS_LITERAL_STRING("messageUnread").get()));
+        tmp_str.Adopt(GetString(MOZ_UTF16("messageUnread")));
         aValue.Assign(tmp_str);
       }
       break;
     default:
       aValue.Assign(colID);
       break;
   }
   return rv;
@@ -3055,24 +3055,24 @@ nsresult nsMsgDBView::DeleteMessages(nsI
     NS_ENSURE_SUCCESS(rv, rv);
     bool dontAsk = false; // "Don't ask..." - unchecked by default.
     int32_t buttonPressed = 0;
 
     nsString dialogTitle;
     nsString confirmString;
     nsString checkboxText;
     nsString buttonApplyNowText;
-    dialogTitle.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.title").get()));
-    checkboxText.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.dontAsk.label").get()));
-    buttonApplyNowText.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.delete.label").get()));
+    dialogTitle.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.title")));
+    checkboxText.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.dontAsk.label")));
+    buttonApplyNowText.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.delete.label")));
 
     if (activePref == warnCollapsedPref)
-      confirmString.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.collapsed.desc").get()));
+      confirmString.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.collapsed.desc")));
     else // if (activePref == warnShiftDelPref || activePref == warnNewsPref)
-      confirmString.Adopt(GetString(NS_LITERAL_STRING("confirmMsgDelete.deleteNoTrash.desc").get()));
+      confirmString.Adopt(GetString(MOZ_UTF16("confirmMsgDelete.deleteNoTrash.desc")));
 
     const uint32_t buttonFlags =
       (nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) +
       (nsIPrompt::BUTTON_TITLE_CANCEL * nsIPrompt::BUTTON_POS_1);
     rv = dialog->ConfirmEx(dialogTitle.get(), confirmString.get(), buttonFlags,
                            buttonApplyNowText.get(), nullptr, nullptr,
                            checkboxText.get(), &dontAsk, &buttonPressed);
     NS_ENSURE_SUCCESS(rv, rv);
--- a/mailnews/base/src/nsMsgFolderDataSource.cpp
+++ b/mailnews/base/src/nsMsgFolderDataSource.cpp
@@ -274,19 +274,19 @@ nsMsgFolderDataSource::~nsMsgFolderDataS
     NS_RELEASE(kIsSecureAtom);
     NS_RELEASE(kCanFileMessagesAtom);
     NS_RELEASE(kInVFEditSearchScopeAtom);
   }
 }
 
 nsresult nsMsgFolderDataSource::CreateLiterals(nsIRDFService *rdf)
 {
-  createNode(NS_LITERAL_STRING("true").get(),
+  createNode(MOZ_UTF16("true"),
     getter_AddRefs(kTrueLiteral), rdf);
-  createNode(NS_LITERAL_STRING("false").get(),
+  createNode(MOZ_UTF16("false"),
     getter_AddRefs(kFalseLiteral), rdf);
 
   return NS_OK;
 }
 
 nsresult nsMsgFolderDataSource::Init()
 {
   nsresult rv;
@@ -1032,19 +1032,19 @@ nsresult nsMsgFolderDataSource::createFo
   return NS_OK;
 }
 
 nsresult nsMsgFolderDataSource::CreateUnreadMessagesNameString(int32_t unreadMessages, nsAutoString &nameString)
 {
   //Only do this if unread messages are positive
   if(unreadMessages > 0)
   {
-    nameString.Append(NS_LITERAL_STRING(" (").get());
+    nameString.Append(NS_LITERAL_STRING(" ("));
     nameString.AppendInt(unreadMessages);
-    nameString.Append(NS_LITERAL_STRING(")").get());
+    nameString.Append(MOZ_UTF16(')'));
   }
   return NS_OK;
 }
 
 nsresult
 nsMsgFolderDataSource::createFolderSpecialNode(nsIMsgFolder *folder,
                                                nsIRDFNode **target)
 {
@@ -1496,23 +1496,23 @@ nsMsgFolderDataSource::createBiffStateNo
 
 nsresult
 nsMsgFolderDataSource::createBiffStateNodeFromFlag(uint32_t flag, nsIRDFNode **target)
 {
   const PRUnichar *biffStateStr;
 
   switch (flag) {
     case nsIMsgFolder::nsMsgBiffState_NewMail:
-      biffStateStr = NS_LITERAL_STRING("NewMail").get();
+      biffStateStr = MOZ_UTF16("NewMail");
       break;
     case nsIMsgFolder::nsMsgBiffState_NoMail:
-      biffStateStr = NS_LITERAL_STRING("NoMail").get();
+      biffStateStr = MOZ_UTF16("NoMail");
       break;
     default:
-      biffStateStr = NS_LITERAL_STRING("UnknownMail").get();
+      biffStateStr = MOZ_UTF16("UnknownMail");
       break;
   }
 
   createNode(biffStateStr, target, getRDFService());
   return NS_OK;
 }
 
 nsresult
@@ -1775,33 +1775,33 @@ nsMsgFolderDataSource::OnTotalMessagePro
   return NS_OK;
 }
 
 nsresult
 nsMsgFolderDataSource::GetNumMessagesNode(int32_t aNumMessages, nsIRDFNode **node)
 {
   uint32_t numMessages = aNumMessages;
   if(numMessages == kDisplayQuestionCount)
-    createNode(NS_LITERAL_STRING("???").get(), node, getRDFService());
+    createNode(MOZ_UTF16("???"), node, getRDFService());
   else if (numMessages == kDisplayBlankCount || numMessages == 0)
     createNode(EmptyString().get(), node, getRDFService());
   else
     createIntNode(numMessages, node, getRDFService());
   return NS_OK;
 }
 
 nsresult
 nsMsgFolderDataSource::GetFolderSizeNode(int32_t aFolderSize, nsIRDFNode **aNode)
 {
   nsresult rv;
   uint32_t folderSize = aFolderSize;
   if (folderSize == kDisplayBlankCount || folderSize == 0)
     createNode(EmptyString().get(), aNode, getRDFService());
   else if(folderSize == kDisplayQuestionCount)
-    createNode(NS_LITERAL_STRING("???").get(), aNode, getRDFService());
+    createNode(MOZ_UTF16("???"), aNode, getRDFService());
   else
   {
     nsAutoString sizeString;
     rv = FormatFileSize(folderSize, true, sizeString);
     NS_ENSURE_SUCCESS(rv, rv);
 
     createNode(sizeString.get(), aNode, getRDFService());
   }
@@ -1966,17 +1966,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(NS_LITERAL_STRING("confirmSavedSearchDeleteMessage").get(), getter_Copies(confirmMsg));
+        sMessengerStringBundle->GetStringFromName(MOZ_UTF16("confirmSavedSearchDeleteMessage"), getter_Copies(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/nsMsgGroupView.cpp
+++ b/mailnews/base/src/nsMsgGroupView.cpp
@@ -749,85 +749,83 @@ NS_IMETHODIMP nsMsgGroupView::CellTextFo
         case nsMsgViewSortType::byDate:
         {
           uint32_t ageBucket = 0;
           GetAgeBucketValue(msgHdr, &ageBucket, rcvDate);
           switch (ageBucket)
           {
           case 1:
             if (m_kTodayString.IsEmpty())
-              m_kTodayString.Adopt(GetString(NS_LITERAL_STRING("today").get()));
+              m_kTodayString.Adopt(GetString(MOZ_UTF16("today")));
             aValue.Assign(m_kTodayString);
             break;
           case 2:
             if (m_kYesterdayString.IsEmpty())
-              m_kYesterdayString.Adopt(GetString(NS_LITERAL_STRING("yesterday").get()));
+              m_kYesterdayString.Adopt(GetString(MOZ_UTF16("yesterday")));
             aValue.Assign(m_kYesterdayString);
             break;
           case 3:
             if (m_kLastWeekString.IsEmpty())
-              m_kLastWeekString.Adopt(GetString(NS_LITERAL_STRING("lastWeek").get()));
+              m_kLastWeekString.Adopt(GetString(MOZ_UTF16("lastWeek")));
             aValue.Assign(m_kLastWeekString);
             break;
           case 4:
             if (m_kTwoWeeksAgoString.IsEmpty())
-              m_kTwoWeeksAgoString.Adopt(GetString(NS_LITERAL_STRING("twoWeeksAgo").get()));
+              m_kTwoWeeksAgoString.Adopt(GetString(MOZ_UTF16("twoWeeksAgo")));
             aValue.Assign(m_kTwoWeeksAgoString);
             break;
           case 5:
             if (m_kOldMailString.IsEmpty())
-              m_kOldMailString.Adopt(GetString(NS_LITERAL_STRING("older").get()));
+              m_kOldMailString.Adopt(GetString(MOZ_UTF16("older")));
             aValue.Assign(m_kOldMailString);
             break;
           default:
             NS_ASSERTION(false, "bad age thread");
             break;
           }
           break;
         }
         case nsMsgViewSortType::byAuthor:
           FetchAuthor(msgHdr, aValue);
           break;
         case nsMsgViewSortType::byStatus:
           rv = FetchStatus(m_flags[aRow], aValue);
           if (aValue.IsEmpty()) {
-            tmp_str.Adopt(GetString(NS_LITERAL_STRING("messagesWithNoStatus").get()));
+            tmp_str.Adopt(GetString(MOZ_UTF16("messagesWithNoStatus")));
             aValue.Assign(tmp_str);
           }
           break;
         case nsMsgViewSortType::byTags:
           rv = FetchTags(msgHdr, aValue);
           if (aValue.IsEmpty()) {
-            tmp_str.Adopt(GetString(NS_LITERAL_STRING("untaggedMessages").get()));
+            tmp_str.Adopt(GetString(MOZ_UTF16("untaggedMessages")));
             aValue.Assign(tmp_str);
           }
           break;
         case nsMsgViewSortType::byPriority:
           FetchPriority(msgHdr, aValue);
           if (aValue.IsEmpty()) {
-            tmp_str.Adopt(GetString(NS_LITERAL_STRING("noPriority").get()));
+            tmp_str.Adopt(GetString(MOZ_UTF16("noPriority")));
             aValue.Assign(tmp_str);
           }
           break;
         case nsMsgViewSortType::byAccount:
           FetchAccount(msgHdr, aValue);
           break;
         case nsMsgViewSortType::byRecipient:
           FetchRecipients(msgHdr, aValue);
           break;
         case nsMsgViewSortType::byAttachments:
-          tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Attachment
-            ? NS_LITERAL_STRING("attachments").get()
-            : NS_LITERAL_STRING("noAttachments").get()));
+          tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Attachment ?
+            MOZ_UTF16("attachments") : MOZ_UTF16("noAttachments")));
           aValue.Assign(tmp_str);
           break;
         case nsMsgViewSortType::byFlagged:
-          tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Marked
-            ? NS_LITERAL_STRING("groupFlagged").get()
-            : NS_LITERAL_STRING("notFlagged").get()));
+          tmp_str.Adopt(GetString(flags & nsMsgMessageFlags::Marked ?
+            MOZ_UTF16("groupFlagged") : MOZ_UTF16("notFlagged")));
           aValue.Assign(tmp_str);
           break;
         // byLocation is a special case; we don't want to have duplicate
         //  all this logic in nsMsgSearchDBView, and its hash key is what we
         //  want anyways, so just copy it across.
         case nsMsgViewSortType::byLocation:
           aValue = hashKey;
           break;
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -74,17 +74,17 @@ nsMsgPrintEngine::OnStateChange(nsIWebPr
 {
   nsresult rv = NS_OK;
 
   // top-level document load data
   if (progressStateFlags & nsIWebProgressListener::STATE_IS_DOCUMENT) {
     if (progressStateFlags & nsIWebProgressListener::STATE_START) {
       // Tell the user we are loading...
       nsString msg;
-      GetString(NS_LITERAL_STRING("LoadingMessageToPrint").get(), msg);
+      GetString(MOZ_UTF16("LoadingMessageToPrint"), msg);
       SetStatusMessage(msg);
     }
 
     if (progressStateFlags & nsIWebProgressListener::STATE_STOP) {
       nsCOMPtr<nsIDocumentLoader> docLoader(do_QueryInterface(aWebProgress));
       if (docLoader) 
       {
         // Check to see if the document DOMWin that is finished loading is the same
@@ -117,17 +117,17 @@ nsMsgPrintEngine::OnStateChange(nsIWebPr
         // loading the documents. If it is NULL (or not a DocLoader) then it 
         // it coming from Printing
         if (docLoader) {
           // Now, fire off the print operation!
           rv = NS_ERROR_FAILURE;
 
           // Tell the user the message is loaded...
           nsString msg;
-          GetString(NS_LITERAL_STRING("MessageLoaded").get(), msg);
+          GetString(MOZ_UTF16("MessageLoaded"), msg);
           SetStatusMessage(msg);
 
           NS_ASSERTION(mDocShell,"can't print, there is no docshell");
           if ( (!mDocShell) || (!aRequest) ) 
           {
             return StartNextPrintOperation();
           }
           nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(aRequest);
@@ -234,17 +234,17 @@ nsMsgPrintEngine::SetWindow(nsIDOMWindow
 
   nsCOMPtr<nsIDocShellTreeItem> rootAsItem;
   docShellAsItem->GetSameTypeRootTreeItem(getter_AddRefs(rootAsItem));
 
   nsCOMPtr<nsIDocShellTreeNode> rootAsNode(do_QueryInterface(rootAsItem));
   NS_ENSURE_TRUE(rootAsNode, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDocShellTreeItem> childItem;
-  rootAsNode->FindChildWithName(NS_LITERAL_STRING("content").get(), true,
+  rootAsNode->FindChildWithName(MOZ_UTF16("content"), true,
 				false, nullptr, nullptr,
 				getter_AddRefs(childItem));
 
   mDocShell = do_QueryInterface(childItem);
 
   if(mDocShell)
     SetupObserver();
 
@@ -311,17 +311,17 @@ nsMsgPrintEngine::SetPrintURICount(int32
 
 NS_IMETHODIMP
 nsMsgPrintEngine::StartPrintOperation(nsIPrintSettings* aPS)
 {
   NS_ENSURE_ARG_POINTER(aPS);
   mPrintSettings = aPS;
 
   // Load the about:blank on the tail end...
-  nsresult rv = AddPrintURI(NS_LITERAL_STRING("about:blank").get()); 
+  nsresult rv = AddPrintURI(MOZ_UTF16("about:blank")); 
   if (NS_FAILED(rv)) return rv; 
   return StartNextPrintOperation();
 }
 
 //----------------------------------------------------------------------
 // Set up to use the "pluggable" Print Progress Dialog
 nsresult
 nsMsgPrintEngine::ShowProgressDialog(bool aIsForPrinting, bool& aDoNotify)
@@ -377,19 +377,19 @@ nsMsgPrintEngine::ShowProgressDialog(boo
 
         if (showProgressDialog) 
         {
           nsIWebProgressListener* wpl = static_cast<nsIWebProgressListener*>(mPrintProgressListener.get());
           NS_ASSERTION(wpl, "nsIWebProgressListener is NULL!");
           NS_ADDREF(wpl);
           nsString msg;
           if (mIsDoingPrintPreview) {
-            GetString(NS_LITERAL_STRING("LoadingMailMsgForPrintPreview").get(), msg);
+            GetString(MOZ_UTF16("LoadingMailMsgForPrintPreview"), msg);
           } else {
-            GetString(NS_LITERAL_STRING("LoadingMailMsgForPrint").get(), msg);
+            GetString(MOZ_UTF16("LoadingMailMsgForPrint"), msg);
           }
           if (!msg.IsEmpty()) 
             mPrintProgressParams->SetDocTitle(msg.get());
         }
       }
     }
   }
   return rv;
@@ -410,17 +410,17 @@ nsMsgPrintEngine::StartNextPrintOperatio
   // First, check if we are at the end of this stuff!
   if (mCurrentlyPrintingURI >= (int32_t)mURIArray.Length())
   {
     // This is the end...dum, dum, dum....my only friend...the end
     mWindow->Close();
 
     // Tell the user we are done...
     nsString msg;
-    GetString(NS_LITERAL_STRING("PrintingComplete").get(), msg);
+    GetString(MOZ_UTF16("PrintingComplete"), msg);
     SetStatusMessage(msg);
     return NS_OK;
   }
 
   if (!mDocShell)
     return StartNextPrintOperation();
 
   const nsString &uri = mURIArray[mCurrentlyPrintingURI];
@@ -599,17 +599,17 @@ nsMsgPrintEngine::PrintMsgWindow()
         mWebBrowserPrint->GetGlobalPrintSettings(getter_AddRefs(mPrintSettings));
       }
       
       // fix for bug #118887 and bug #176016
       // don't show the actual url when printing mail messages or addressbook cards.
       // for mail, it can review the salt.  for addrbook, it's a data:// url, which
       // means nothing to the end user.
       // needs to be " " and not "" or nullptr, otherwise, we'll still print the url
-      mPrintSettings->SetDocURL(NS_LITERAL_STRING(" ").get());
+      mPrintSettings->SetDocURL(MOZ_UTF16(" "));
 
       nsresult rv = NS_ERROR_FAILURE;
       if (mIsDoingPrintPreview) 
       {
         if (mStartupPPObs) {
           rv = mStartupPPObs->Observe(nullptr, nullptr, nullptr);
         }
       } 
--- a/mailnews/base/src/nsMsgStatusFeedback.cpp
+++ b/mailnews/base/src/nsMsgStatusFeedback.cpp
@@ -82,17 +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(NS_LITERAL_STRING("documentLoading").get(),
+      rv = mBundle->GetStringFromName(MOZ_UTF16("documentLoading"),
                                       getter_Copies(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
@@ -136,17 +136,17 @@ nsMsgStatusFeedback::OnStateChange(nsIWe
               if (msgFolder && msgHdr)
                 msgFolder->NotifyPropertyFlagChanged(msgHdr, m_msgLoadedAtom, 0, 1);
             }
           }
         }
       }
       StopMeteors();
       nsString documentDone;
-      rv = mBundle->GetStringFromName(NS_LITERAL_STRING("documentDone").get(),
+      rv = mBundle->GetStringFromName(MOZ_UTF16("documentDone"),
                                       getter_Copies(documentDone));
       if (NS_SUCCEEDED(rv))
         ShowStatusString(documentDone);
     }
   }
   return NS_OK;
 }
 
@@ -286,17 +286,17 @@ NS_IMETHODIMP nsMsgStatusFeedback::OnSta
   nsString statusMessage;
   if (!str.IsEmpty() && str.Find(accountName) == kNotFound)
   {
     nsCOMPtr<nsIStringBundle> bundle;
     rv = sbs->CreateBundle(MSGS_URL, getter_AddRefs(bundle));
     const PRUnichar *params[] = { accountName.get(),
                                   str.get() };
     rv = bundle->FormatStringFromName(
-      NS_LITERAL_STRING("statusMessage").get(),
+      MOZ_UTF16("statusMessage"),
       params, 2, getter_Copies(statusMessage));
     NS_ENSURE_SUCCESS(rv, rv);
   }
   else
   {
     statusMessage.Assign(str);
   }
   return ShowStatusString(statusMessage);
--- a/mailnews/base/src/nsMsgWindow.cpp
+++ b/mailnews/base/src/nsMsgWindow.cpp
@@ -83,17 +83,17 @@ NS_IMETHODIMP nsMsgWindow::GetMessageWin
   {
     // if we don't have a docshell, then we need to look up the message pane docshell
     nsCOMPtr<nsIDocShell> rootShell(do_QueryReferent(mRootDocShellWeak));
     if (rootShell)
     {
       nsCOMPtr<nsIDocShellTreeNode> rootAsNode(do_QueryInterface(rootShell));
       nsCOMPtr<nsIDocShellTreeItem> msgDocShellItem;
       if(rootAsNode)
-         rootAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
+         rootAsNode->FindChildWithName(MOZ_UTF16("messagepane"),
                                        true, false, nullptr, nullptr,
                                        getter_AddRefs(msgDocShellItem));
       NS_ENSURE_TRUE(msgDocShellItem, NS_ERROR_FAILURE);
       docShell = do_QueryInterface(msgDocShellItem);
       // we don't own mMessageWindowDocShell so don't try to keep a reference to it!
       mMessageWindowDocShellWeak = do_GetWeakReference(docShell);
     }
   }
@@ -473,19 +473,19 @@ NS_IMETHODIMP nsMsgWindow::GetPromptDial
 
 NS_IMETHODIMP
 nsMsgWindow::DisplayHTMLInMessagePane(const nsAString& title, const nsAString& body, bool clearMsgHdr)
 {
   if (clearMsgHdr && mMsgWindowCommands)
     mMsgWindowCommands->ClearMsgPane();
 
   nsString htmlStr;
-  htmlStr.Append(NS_LITERAL_STRING("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>").get());
+  htmlStr.Append(NS_LITERAL_STRING("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>"));
   htmlStr.Append(body);
-  htmlStr.Append(NS_LITERAL_STRING("</body></html>").get());
+  htmlStr.Append(NS_LITERAL_STRING("</body></html>"));
 
   char *encodedHtml = PL_Base64Encode(NS_ConvertUTF16toUTF8(htmlStr).get(), 0, nullptr);
   if (!encodedHtml)
     return NS_ERROR_OUT_OF_MEMORY;
 
   nsCString dataSpec;
   dataSpec = "data:text/html;base64,";
   dataSpec += encodedHtml;
--- a/mailnews/base/src/nsSpamSettings.cpp
+++ b/mailnews/base/src/nsSpamSettings.cpp
@@ -679,17 +679,17 @@ NS_IMETHODIMP nsSpamSettings::LogJunkHit
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://messenger/locale/filter.properties",
     getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   const PRUnichar *junkLogDetectFormatStrings[3] = { authorValue.get(), subjectValue.get(), dateValue.get() };
   nsString junkLogDetectStr;
   rv = bundle->FormatStringFromName(
-    NS_LITERAL_STRING("junkLogDetectStr").get(),
+    MOZ_UTF16("junkLogDetectStr"),
     junkLogDetectFormatStrings, 3,
     getter_Copies(junkLogDetectStr));
   NS_ENSURE_SUCCESS(rv, rv);
 
   buffer += NS_ConvertUTF16toUTF8(junkLogDetectStr);
   buffer +=  "\n";
 
   if (aMoveMessage) {
@@ -701,17 +701,17 @@ NS_IMETHODIMP nsSpamSettings::LogJunkHit
     NS_ENSURE_SUCCESS(rv, rv);
 
     NS_ConvertASCIItoUTF16 msgIdValue(msgId);
     NS_ConvertASCIItoUTF16 junkFolderURIValue(junkFolderURI);
 
     const PRUnichar *logMoveFormatStrings[2] = { msgIdValue.get(), junkFolderURIValue.get() };
     nsString logMoveStr;
     rv = bundle->FormatStringFromName(
-      NS_LITERAL_STRING("logMoveStr").get(),
+      MOZ_UTF16("logMoveStr"),
       logMoveFormatStrings, 2,
       getter_Copies(logMoveStr));
     NS_ENSURE_SUCCESS(rv, rv);
 
     buffer += NS_ConvertUTF16toUTF8(logMoveStr);
     buffer += "\n";
   }
 
--- a/mailnews/base/src/nsSubscribableServer.cpp
+++ b/mailnews/base/src/nsSubscribableServer.cpp
@@ -35,20 +35,20 @@ nsSubscribableServer::Init()
     rv = mRDFService->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "child"),
                                   getter_AddRefs(kNC_Child));
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = mRDFService->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "Subscribed"),
                                   getter_AddRefs(kNC_Subscribed));
     NS_ENSURE_SUCCESS(rv,rv);
 
-    rv = mRDFService->GetLiteral(NS_LITERAL_STRING("true").get(),getter_AddRefs(kTrueLiteral));
+    rv = mRDFService->GetLiteral(MOZ_UTF16("true"), getter_AddRefs(kTrueLiteral));
     NS_ENSURE_SUCCESS(rv,rv);
 
-    rv = mRDFService->GetLiteral(NS_LITERAL_STRING("false").get(),getter_AddRefs(kFalseLiteral));
+    rv = mRDFService->GetLiteral(MOZ_UTF16("false"), getter_AddRefs(kFalseLiteral));
     NS_ENSURE_SUCCESS(rv,rv);
     return NS_OK;
 }
 
 nsSubscribableServer::~nsSubscribableServer(void)
 {
     nsresult rv = NS_OK;
 #ifdef DEBUG_seth
--- a/mailnews/base/src/nsSubscribeDataSource.cpp
+++ b/mailnews/base/src/nsSubscribeDataSource.cpp
@@ -62,20 +62,20 @@ nsSubscribeDataSource::Init()
     rv = mRDFService->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "Subscribable"),
                                   getter_AddRefs(kNC_Subscribable));
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = mRDFService->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "ServerType"),
                                   getter_AddRefs(kNC_ServerType));
     NS_ENSURE_SUCCESS(rv,rv);
 
-    rv = mRDFService->GetLiteral(NS_LITERAL_STRING("true").get(),getter_AddRefs(kTrueLiteral));
+    rv = mRDFService->GetLiteral(MOZ_UTF16("true"), getter_AddRefs(kTrueLiteral));
     NS_ENSURE_SUCCESS(rv,rv);
-  
-    rv = mRDFService->GetLiteral(NS_LITERAL_STRING("false").get(),getter_AddRefs(kFalseLiteral));
+
+    rv = mRDFService->GetLiteral(MOZ_UTF16("false"), getter_AddRefs(kFalseLiteral));
     NS_ENSURE_SUCCESS(rv,rv);
 	return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsSubscribeDataSource::GetURI(char * *aURI)
 {
   if ((*aURI = strdup("rdf:subscribe")) == nullptr)
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -1914,25 +1914,25 @@ nsresult nsMsgDBFolder::HandleAutoCompac
         {
           nsCOMPtr <nsIStringBundle> bundle;
           rv = GetBaseStringBundle(getter_AddRefs(bundle));
           NS_ENSURE_SUCCESS(rv, rv);
           nsString dialogTitle;
           nsString confirmString;
           nsString checkboxText;
           nsString buttonCompactNowText;
-          rv = bundle->GetStringFromName(NS_LITERAL_STRING("autoCompactAllFoldersTitle").get(), getter_Copies(dialogTitle));
+          rv = bundle->GetStringFromName(MOZ_UTF16("autoCompactAllFoldersTitle"), getter_Copies(dialogTitle));
           NS_ENSURE_SUCCESS(rv, rv);
-          rv = bundle->GetStringFromName(NS_LITERAL_STRING("autoCompactAllFolders").get(), getter_Copies(confirmString));
+          rv = bundle->GetStringFromName(MOZ_UTF16("autoCompactAllFolders"), getter_Copies(confirmString));
           NS_ENSURE_SUCCESS(rv, rv);
-          rv = bundle->GetStringFromName(NS_LITERAL_STRING("autoCompactAlwaysAskCheckbox").get(),
-                                                          getter_Copies(checkboxText));
+          rv = bundle->GetStringFromName(MOZ_UTF16("autoCompactAlwaysAskCheckbox"),
+                                         getter_Copies(checkboxText));
           NS_ENSURE_SUCCESS(rv, rv);
-          rv = bundle->GetStringFromName(NS_LITERAL_STRING("compactNowButton").get(),
-                                                          getter_Copies(buttonCompactNowText));
+          rv = bundle->GetStringFromName(MOZ_UTF16("compactNowButton"),
+                                         getter_Copies(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);
 
@@ -2914,37 +2914,37 @@ 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(NS_LITERAL_STRING("inboxFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("inboxFolderName"),
                             &kLocalizedInboxName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("trashFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("trashFolderName"),
                             &kLocalizedTrashName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("sentFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("sentFolderName"),
                             &kLocalizedSentName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("draftsFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("draftsFolderName"),
                             &kLocalizedDraftsName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("templatesFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("templatesFolderName"),
                             &kLocalizedTemplatesName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("junkFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("junkFolderName"),
                             &kLocalizedJunkName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("outboxFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("outboxFolderName"),
                             &kLocalizedUnsentName);
-  bundle->GetStringFromName(NS_LITERAL_STRING("archivesFolderName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("archivesFolderName"),
                             &kLocalizedArchivesName);
 
   nsCOMPtr<nsIStringBundle> brandBundle;
   rv = bundleService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
-  bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+  bundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                             &kLocalizedBrandShortName);
   return NS_OK;
 }
 
 nsresult
 nsMsgDBFolder::createCollationKeyGenerator()
 {
   nsresult rv = NS_OK;
--- a/mailnews/base/util/nsMsgI18N.cpp
+++ b/mailnews/base/util/nsMsgI18N.cpp
@@ -228,17 +228,17 @@ bool nsMsgI18Nstateful_charset(const cha
 bool nsMsgI18Nmultibyte_charset(const char *charset)
 {
   nsresult res;
   nsCOMPtr <nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
   bool result = false;
 
   if (NS_SUCCEEDED(res)) {
     nsAutoString charsetData;
-    res = ccm->GetCharsetData(charset, NS_LITERAL_STRING(".isMultibyte").get(), charsetData);
+    res = ccm->GetCharsetData(charset, MOZ_UTF16(".isMultibyte"), charsetData);
     if (NS_SUCCEEDED(res)) {
       result = charsetData.LowerCaseEqualsLiteral("true");
     }
   }
 
   return result;
 }
 
--- a/mailnews/base/util/nsMsgIncomingServer.cpp
+++ b/mailnews/base/util/nsMsgIncomingServer.cpp
@@ -1612,21 +1612,21 @@ 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(NS_LITERAL_STRING("nocachedbodybody").get(), getter_Copies(errorMsgBody));
-    bundle->GetStringFromName(NS_LITERAL_STRING("nocachedbodytitle").get(),  getter_Copies(errorMsgTitle));
+    bundle->GetStringFromName(MOZ_UTF16("nocachedbodybody"), getter_Copies(errorMsgBody));
+    bundle->GetStringFromName(MOZ_UTF16("nocachedbodytitle"), getter_Copies(errorMsgTitle));
     aMsgWindow->DisplayHTMLInMessagePane(errorMsgTitle, errorMsgBody, true);
   }
-  
+
   return NS_OK;
 }
 
 // Called only during the migration process. A unique name is generated for the
 // migrated account.
 NS_IMETHODIMP
 nsMsgIncomingServer::GeneratePrettyNameForMigration(nsAString& aPrettyName)
 {
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -2119,35 +2119,35 @@ NS_MSG_BASE nsresult MsgPromptLoginFaile
   rv = bundleSvc->CreateBundle("chrome://messenger/locale/messenger.properties",
                                getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString message;
   NS_ConvertUTF8toUTF16 hostNameUTF16(aHostname);
   const PRUnichar *formatStrings[] = { hostNameUTF16.get() };
 
-  rv = bundle->FormatStringFromName(NS_LITERAL_STRING("mailServerLoginFailed").get(),
+  rv = bundle->FormatStringFromName(MOZ_UTF16("mailServerLoginFailed"),
                                     formatStrings, 1,
                                     getter_Copies(message));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString title;
   rv = bundle->GetStringFromName(
-    NS_LITERAL_STRING("mailServerLoginFailedTitle").get(), getter_Copies(title));
+    MOZ_UTF16("mailServerLoginFailedTitle"), getter_Copies(title));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString button0;
   rv = bundle->GetStringFromName(
-    NS_LITERAL_STRING("mailServerLoginFailedRetryButton").get(),
+    MOZ_UTF16("mailServerLoginFailedRetryButton"),
     getter_Copies(button0));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString button2;
   rv = bundle->GetStringFromName(
-    NS_LITERAL_STRING("mailServerLoginFailedEnterNewPasswordButton").get(),
+    MOZ_UTF16("mailServerLoginFailedEnterNewPasswordButton"),
     getter_Copies(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) +
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -2017,17 +2017,17 @@ nsresult nsMsgCompose::CreateMessage(con
                 nsresult rv;
                 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(NS_LITERAL_STRING("messageAttachmentSafeName").get(),
+                composeBundle->GetStringFromName(MOZ_UTF16("messageAttachmentSafeName"),
                                                  getter_Copies(sanitizedSubj));
               }
               else
                 sanitizedSubj.Assign(subject);
 
               // set the file size
               uint32_t messageSize;
               msgHdr->GetMessageSize(&messageSize);
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -412,17 +412,17 @@ nsMsgComposeService::GetOrigWindowSelect
   nsCOMPtr<nsIDocShell> rootDocShell;
   rv = aMsgWindow->GetRootDocShell(getter_AddRefs(rootDocShell));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShellTreeNode> rootDocShellAsNode(do_QueryInterface(rootDocShell, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShellTreeItem> childAsItem;
-  rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
+  rv = rootDocShellAsNode->FindChildWithName(MOZ_UTF16("messagepane"),
                                              true, false, nullptr, nullptr, getter_AddRefs(childAsItem));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(childAsItem, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMWindow> domWindow(do_GetInterface(childAsItem, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
--- a/mailnews/compose/src/nsMsgPrompts.cpp
+++ b/mailnews/compose/src/nsMsgPrompts.cpp
@@ -64,23 +64,23 @@ nsMsgBuildMessageByName(const PRUnichar 
 
   const PRUnichar *params[1] = {path.get()};
   return bundle->FormatStringFromName(aName, params, 1, getter_Copies(aResult));
 }
 
 nsresult
 nsMsgBuildMessageWithFile(nsIFile *aFile, nsString& aResult)
 {
-  return nsMsgBuildMessageByName(NS_LITERAL_STRING("unableToOpenFile").get(), aFile, aResult);
+  return nsMsgBuildMessageByName(MOZ_UTF16("unableToOpenFile"), aFile, aResult);
 }
 
 nsresult
 nsMsgBuildMessageWithTmpFile(nsIFile *aFile, nsString& aResult)
 {
-  return nsMsgBuildMessageByName(NS_LITERAL_STRING("unableToOpenTmpFile").get(), aFile, aResult);
+  return nsMsgBuildMessageByName(MOZ_UTF16("unableToOpenTmpFile"), aFile, aResult);
 }
 
 nsresult
 nsMsgDisplayMessageByID(nsIPrompt * aPrompt, nsresult msgID, const PRUnichar * windowTitle)
 {
   nsString msg;
   nsMsgGetMessageByID(msgID, msg);
   return nsMsgDisplayMessageByString(aPrompt, msg.get(), windowTitle);
--- a/mailnews/compose/src/nsMsgSend.cpp
+++ b/mailnews/compose/src/nsMsgSend.cpp
@@ -3984,17 +3984,17 @@ nsMsgComposeAndSend::NotifyListenerOnSto
     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;
     const PRUnichar *formatStrings[] = { mSavedToFolderName.get() };
 
-    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("errorSavingMsg").get(),
+    rv = bundle->FormatStringFromName(MOZ_UTF16("errorSavingMsg"),
                                       formatStrings, 1,
                                       getter_Copies(msg));
     if (NS_SUCCEEDED(rv))
     {
       bool retry = false;
       nsMsgAskBooleanQuestionByString(prompt, msg.get(), &retry, nullptr);
       if (retry)
       {
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -93,17 +93,17 @@ nsresult nsExplainErrorDetails(nsISmtpUr
   NS_ENSURE_SUCCESS(rv, rv);
 
   va_start (args, code);
 
   switch (code)
   {
     case NS_ERROR_ILLEGAL_LOCALPART:
       bundle->GetStringFromName(
-        NS_LITERAL_STRING("errorIllegalLocalPart").get(),
+        MOZ_UTF16("errorIllegalLocalPart"),
         getter_Copies(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:
@@ -2043,31 +2043,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(
-      NS_LITERAL_STRING("smtpEnterPasswordPromptWithUsername").get(),
+      MOZ_UTF16("smtpEnterPasswordPromptWithUsername"),
       formatStrings, 2, getter_Copies(passwordPromptString));
   else
     rv = composeStringBundle->FormatStringFromName(
-      NS_LITERAL_STRING("smtpEnterPasswordPrompt").get(),
+      MOZ_UTF16("smtpEnterPasswordPrompt"),
       formatStrings, 1, getter_Copies(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(
-    NS_LITERAL_STRING("smtpEnterPasswordPromptTitle").get(),
+    MOZ_UTF16("smtpEnterPasswordPromptTitle"),
     getter_Copies(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
@@ -66,25 +66,25 @@ NS_IMETHODIMP nsMsgMailView::GetPrettyNa
                                     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(NS_LITERAL_STRING("mailViewPeopleIKnow").get(), aMailViewName);
+        rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewPeopleIKnow"), aMailViewName);
     else if (mName.EqualsLiteral(kDefaultViewRecent))
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewRecentMail").get(), aMailViewName);
+        rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewRecentMail"), aMailViewName);
     else if (mName.EqualsLiteral(kDefaultViewFiveDays))
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewLastFiveDays").get(), aMailViewName);
+        rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewLastFiveDays"), aMailViewName);
     else if (mName.EqualsLiteral(kDefaultViewNotJunk))
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewNotJunk").get(), aMailViewName);
+        rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewNotJunk"), aMailViewName);
     else if (mName.EqualsLiteral(kDefaultViewHasAttachments))
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("mailViewHasAttachments").get(), aMailViewName);
+        rv = mBundle->GetStringFromName(MOZ_UTF16("mailViewHasAttachments"), aMailViewName);
     else
         *aMailViewName = ToNewUnicode(mName);
 
     return rv;
 }
 
 NS_IMETHODIMP nsMsgMailView::GetSearchTerms(nsISupportsArray ** aSearchTerms)
 {
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
@@ -466,17 +466,17 @@ nsresult nsMsgMdnGenerator::CreateFirstP
     // convert fullName to UTF8 before passing it to MakeMimeAddress
     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(NS_LITERAL_STRING("MsgMdnMsgSentTo").get(), NS_ConvertASCIItoUTF16(m_email).get(),
+    rv = FormatStringFromName(MOZ_UTF16("MsgMdnMsgSentTo"), NS_ConvertASCIItoUTF16(m_email).get(),
                             getter_Copies(firstPart1));
     if (NS_FAILED(rv))
         return rv;
 
     PUSH_N_FREE_STRING (parm);
 
     PR_Free(convbuf);
 
@@ -488,42 +488,42 @@ nsresult nsMsgMdnGenerator::CreateFirstP
       PUSH_N_FREE_STRING(tmpBuffer);
     }
 
     nsString receipt_string;
     switch (m_disposeType)
     {
     case nsIMsgMdnGenerator::eDisplayed:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MdnDisplayedReceipt").get(),
+            MOZ_UTF16("MdnDisplayedReceipt"),
             getter_Copies(receipt_string));
         break;
     case nsIMsgMdnGenerator::eDispatched:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MdnDispatchedReceipt").get(),
+            MOZ_UTF16("MdnDispatchedReceipt"),
             getter_Copies(receipt_string));
         break;
     case nsIMsgMdnGenerator::eProcessed:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MdnProcessedReceipt").get(),
+            MOZ_UTF16("MdnProcessedReceipt"),
             getter_Copies(receipt_string));
         break;
     case nsIMsgMdnGenerator::eDeleted:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MdnDeletedReceipt").get(),
+            MOZ_UTF16("MdnDeletedReceipt"),
             getter_Copies(receipt_string));
         break;
     case nsIMsgMdnGenerator::eDenied:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MdnDeniedReceipt").get(),
+            MOZ_UTF16("MdnDeniedReceipt"),
             getter_Copies(receipt_string));
         break;
     case nsIMsgMdnGenerator::eFailed:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MdnFailedReceipt").get(),
+            MOZ_UTF16("MdnFailedReceipt"),
             getter_Copies(receipt_string));
         break;
     default:
         rv = NS_ERROR_INVALID_ARG;
         break;
     }
 
     if (NS_FAILED(rv))
@@ -589,42 +589,42 @@ report-type=disposition-notification;\r\
         tmpBuffer = PR_smprintf("%s" CRLF CRLF, NS_ConvertUTF16toUTF8(firstPart1).get());
         PUSH_N_FREE_STRING(tmpBuffer);
     }
 
     switch (m_disposeType)
     {
     case nsIMsgMdnGenerator::eDisplayed:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MsgMdnDisplayed").get(),
+            MOZ_UTF16("MsgMdnDisplayed"),
             getter_Copies(firstPart2));
         break;
     case nsIMsgMdnGenerator::eDispatched:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MsgMdnDispatched").get(),
+            MOZ_UTF16("MsgMdnDispatched"),
             getter_Copies(firstPart2));
         break;
     case nsIMsgMdnGenerator::eProcessed:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MsgMdnProcessed").get(),
+            MOZ_UTF16("MsgMdnProcessed"),
             getter_Copies(firstPart2));
         break;
     case nsIMsgMdnGenerator::eDeleted:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MsgMdnDeleted").get(),
+            MOZ_UTF16("MsgMdnDeleted"),
             getter_Copies(firstPart2));
         break;
     case nsIMsgMdnGenerator::eDenied:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MsgMdnDenied").get(),
+            MOZ_UTF16("MsgMdnDenied"),
             getter_Copies(firstPart2));
         break;
     case nsIMsgMdnGenerator::eFailed:
         rv = GetStringFromName(
-            NS_LITERAL_STRING("MsgMdnFailed").get(),
+            MOZ_UTF16("MsgMdnFailed"),
             getter_Copies(firstPart2));
         break;
     default:
         rv = NS_ERROR_INVALID_ARG;
         break;
     }
 
     if (NS_FAILED(rv))
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
@@ -459,18 +459,18 @@ nsresult nsMsgComposeSecure::MimeInitEnc
 
   nsCOMPtr<nsIStringBundle> sMIMEBundle;
   nsString mime_smime_enc_content_desc;
 
   bundleSvc->CreateBundle(SMIME_STRBUNDLE_URL, getter_AddRefs(sMIMEBundle));
 
   if (!sMIMEBundle)
     return NS_ERROR_FAILURE;
- 
-  sMIMEBundle->GetStringFromName(NS_LITERAL_STRING("mime_smimeEncryptedContentDesc").get(),
+
+  sMIMEBundle->GetStringFromName(MOZ_UTF16("mime_smimeEncryptedContentDesc"),
                                  getter_Copies(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",
@@ -520,34 +520,34 @@ nsresult nsMsgComposeSecure::MimeInitEnc
 
   /* Initialize the encrypter (and add the sender's cert.) */
   PR_ASSERT(mSelfEncryptionCert);
   PR_SetError(0,0);
   mEncryptionCinfo = do_CreateInstance(NS_CMSMESSAGE_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
   rv = mEncryptionCinfo->CreateEncrypted(mCerts);
   if (NS_FAILED(rv)) {
-    SetError(sendReport, NS_LITERAL_STRING("ErrorEncryptMail").get());
+    SetError(sendReport, MOZ_UTF16("ErrorEncryptMail"));
     goto FAIL;
   }
 
   mEncryptionContext = do_CreateInstance(NS_CMSENCODER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
 
   if (!mBuffer) {
     mBuffer = new char[eBufferSize];
     if (!mBuffer)
       return NS_ERROR_OUT_OF_MEMORY;
   }
 
   mBufferedBytes = 0;
 
   rv = mEncryptionContext->Start(mEncryptionCinfo, mime_crypto_write_base64, mCryptoEncoder);
   if (NS_FAILED(rv)) {
-    SetError(sendReport, NS_LITERAL_STRING("ErrorEncryptMail").get());
+    SetError(sendReport, MOZ_UTF16("ErrorEncryptMail"));
     goto FAIL;
   }
 
   /* If we're signing, tack a multipart/signed header onto the front of
    the data to be encrypted, and initialize the sign-hashing code too.
    */
   if (aSign) {
     rv = MimeInitMultipartSigned(false, sendReport);
@@ -575,18 +575,18 @@ nsresult nsMsgComposeSecure::MimeFinishM
 
   nsCOMPtr<nsIStringBundle> sMIMEBundle;
   nsString mime_smime_sig_content_desc;
 
   bundleSvc->CreateBundle(SMIME_STRBUNDLE_URL, getter_AddRefs(sMIMEBundle));
 
   if (!sMIMEBundle)
     return NS_ERROR_FAILURE;
-  
-  sMIMEBundle->GetStringFromName(NS_LITERAL_STRING("mime_smimeSignatureContentDesc").get(),
+
+  sMIMEBundle->GetStringFromName(MOZ_UTF16("mime_smimeSignatureContentDesc"),
                                  getter_Copies(mime_smime_sig_content_desc));
 
   NS_ConvertUTF16toUTF8 sig_content_desc_utf8(mime_smime_sig_content_desc);
 
   /* Compute the hash...
    */
 
   nsAutoCString hashString;
@@ -639,38 +639,38 @@ nsresult nsMsgComposeSecure::MimeFinishM
 
   PR_ASSERT(mHashType == nsICryptoHash::SHA1);
 
   PR_ASSERT (mSelfSigningCert);
   PR_SetError(0,0);
 
   rv = cinfo->CreateSigned(mSelfSigningCert, mSelfEncryptionCert, (unsigned char*)hashString.get(), hashString.Length());
   if (NS_FAILED(rv))  {
-    SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSignMail").get());
+    SetError(sendReport, MOZ_UTF16("ErrorCanNotSignMail"));
     goto FAIL;
   }
 
   // Initialize the base64 encoder for the signature data.
   MOZ_ASSERT(!mSigEncoder, "Shouldn't already have a mSigEncoder");
   mSigEncoder = MimeEncoder::GetBase64Encoder(
     (aOuter ? mime_encoder_output_fn : mime_nested_encoder_output_fn), this);
 
   /* Write out the signature.
    */
   PR_SetError(0,0);
   rv = encoder->Start(cinfo, mime_crypto_write_base64, mSigEncoder);
   if (NS_FAILED(rv)) {
-    SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSignMail").get());
+    SetError(sendReport, MOZ_UTF16("ErrorCanNotSignMail"));
     goto FAIL;
   }
 
   // We're not passing in any data, so no update needed.
   rv = encoder->Finish();
   if (NS_FAILED(rv)) {
-    SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSignMail").get());
+    SetError(sendReport, MOZ_UTF16("ErrorCanNotSignMail"));
     goto FAIL;
   }
 
   // Shut down the sig's base64 encoder.
   rv = mSigEncoder->Flush();
   mSigEncoder = nullptr;
   if (NS_FAILED(rv)) {
     goto FAIL;
@@ -731,20 +731,20 @@ nsresult nsMsgComposeSecure::MimeFinishE
   if (mBufferedBytes) {
     rv = mEncryptionContext->Update(mBuffer, mBufferedBytes);
     mBufferedBytes = 0;
     if (NS_FAILED(rv)) {
       PR_ASSERT(PR_GetError() < 0);
       goto FAIL;
     }
   }
-  
+
   rv = mEncryptionContext->Finish();
   if (NS_FAILED(rv)) {
-    SetError(sendReport, NS_LITERAL_STRING("ErrorEncryptMail").get());
+    SetError(sendReport, MOZ_UTF16("ErrorEncryptMail"));
     goto FAIL;
   }
 
   mEncryptionContext = 0;
 
   PR_ASSERT(mEncryptionCinfo);
   if (!mEncryptionCinfo) {
     rv = NS_ERROR_FAILURE;
@@ -782,22 +782,22 @@ nsresult nsMsgComposeSecure::MimeCryptoH
   }
 
   PR_ASSERT(aEncrypt || aSign);
   certdb->FindEmailEncryptionCert(mEncryptionCertName, getter_AddRefs(mSelfEncryptionCert));
   certdb->FindEmailSigningCert(mSigningCertName, getter_AddRefs(mSelfSigningCert));
 
   // must have both the signing and encryption certs to sign
   if ((mSelfSigningCert == nullptr) && aSign) {
-    SetError(sendReport, NS_LITERAL_STRING("NoSenderSigningCert").get());
+    SetError(sendReport, MOZ_UTF16("NoSenderSigningCert"));
     return NS_ERROR_FAILURE;
   }
 
   if ((mSelfEncryptionCert == nullptr) && aEncrypt) {
-    SetError(sendReport, NS_LITERAL_STRING("NoSenderEncryptionCert").get());
+    SetError(sendReport, MOZ_UTF16("NoSenderEncryptionCert"));
     return NS_ERROR_FAILURE;
   }
 
 
   if (aEncrypt && mSelfEncryptionCert) {
     // Make sure self's configured cert is prepared for being used
     // as an email recipient cert.
     
@@ -821,17 +821,17 @@ nsresult nsMsgComposeSecure::MimeCryptoH
       ToLowerCase(mailboxes[i], mailbox_lowercase);
       nsCOMPtr<nsIX509Cert> cert;
       res = certdb->FindCertByEmailAddress(nullptr, mailbox_lowercase.get(),
                                            getter_AddRefs(cert));
       if (NS_FAILED(res)) {
         // Failure to find a valid encryption cert is fatal.
         // Here I assume that mailbox is ascii rather than utf8.
         SetErrorWithParam(sendReport,
-                          NS_LITERAL_STRING("MissingRecipientEncryptionCert").get(),
+                          MOZ_UTF16("MissingRecipientEncryptionCert"),
                           mailboxes[i].get());
 
         return res;
       }
 
     /* #### see if recipient requests `signedData'.
      if (...) no_clearsigning_p = true;
      (This is the only reason we even bother looking up the certs
--- a/mailnews/imap/src/nsIMAPBodyShell.cpp
+++ b/mailnews/imap/src/nsIMAPBodyShell.cpp
@@ -511,17 +511,17 @@ int32_t nsIMAPBodypart::GenerateEmptyFil
     return 0; // don't need to prefetch anything
 
   nsCOMPtr<nsIStringBundle> bundle;
   nsresult rv = IMAPGetStringBundle(getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, 0);
 
   nsAutoString emptyString;
   rv = bundle->GetStringFromName(
-    NS_LITERAL_STRING("imapEmptyMimePart").get(),
+    MOZ_UTF16("imapEmptyMimePart"),
     getter_Copies(emptyString));
   if (NS_SUCCEEDED(rv) && !emptyString.IsEmpty())
   {
     if (stream)
     {
       nsImapProtocol *conn = aShell->GetConnection();
       conn->Log("SHELL", "GENERATE-Filling", m_partNumberString);
       conn->HandleMessageDownLoadLine(NS_ConvertUTF16toUTF8(emptyString).get(),
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -1799,17 +1799,17 @@ nsImapIncomingServer::FEAlert(const nsAS
     nsresult rv = GetPrettyName(hostName);
     if (NS_SUCCEEDED(rv))
     {
       nsString message;
       nsString tempString(aAlertString);
       const PRUnichar *params[] = { hostName.get(), tempString.get() };
 
       rv = m_stringBundle->FormatStringFromName(
-        NS_LITERAL_STRING("imapServerAlert").get(),
+        MOZ_UTF16("imapServerAlert"),
         params, 2, getter_Copies(message));
       if (NS_SUCCEEDED(rv))
         return AlertUser(message, aUrl);
     }
   }
   return AlertUser(aAlertString, aUrl);
 }
 
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -1599,30 +1599,30 @@ NS_IMETHODIMP nsImapMailFolder::Rename (
       if (NS_SUCCEEDED(rv) && bundle)
       {
         const PRUnichar *formatStrings[] =
         {
           (const PRUnichar*)(intptr_t)m_hierarchyDelimiter
         };
         nsString alertString;
         rv = bundle->FormatStringFromName(
-          NS_LITERAL_STRING("imapSpecialChar").get(),
+          MOZ_UTF16("imapSpecialChar"),
           formatStrings, 1, getter_Copies(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 PRUnichar *titleParams[] = { accountName.get() };
         rv = bundle->FormatStringFromName(
-          NS_LITERAL_STRING("imapAlertDialogTitle").get(),
+          MOZ_UTF16("imapAlertDialogTitle"),
           titleParams, 1, getter_Copies(dialogTitle));
 
         if (dialog && !alertString.IsEmpty())
           dialog->Alert(dialogTitle.get(), alertString.get());
       }
     }
     return NS_ERROR_FAILURE;
   }
@@ -2410,30 +2410,30 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
 
     nsAutoString folderName;
     rv = curFolder->GetName(folderName);
     NS_ENSURE_SUCCESS(rv, rv);
     const PRUnichar *formatStrings[1] = { folderName.get() };
 
     nsAutoString deleteFolderDialogTitle;
     rv = bundle->GetStringFromName(
-      NS_LITERAL_STRING("imapDeleteFolderDialogTitle").get(),
+      MOZ_UTF16("imapDeleteFolderDialogTitle"),
       getter_Copies(deleteFolderDialogTitle));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString deleteFolderButtonLabel;
     rv = bundle->GetStringFromName(
-      NS_LITERAL_STRING("imapDeleteFolderButtonLabel").get(),
+      MOZ_UTF16("imapDeleteFolderButtonLabel"),
       getter_Copies(deleteFolderButtonLabel));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString confirmationStr;
     rv = bundle->FormatStringFromName((deleteNoTrash) ?
-        NS_LITERAL_STRING("imapDeleteNoTrash").get() :
-        NS_LITERAL_STRING("imapMoveFolderToTrash").get(),
+        MOZ_UTF16("imapDeleteNoTrash") :
+        MOZ_UTF16("imapMoveFolderToTrash"),
       formatStrings, 1, getter_Copies(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)
@@ -6009,17 +6009,17 @@ nsImapMailFolder::FillInFolderProps(nsIM
     }
     else
     {
       // is this right? It doesn't leak, does it?
       CopyASCIItoUTF16(owner, uniOwner);
     }
     const PRUnichar *params[] = { uniOwner.get() };
     rv = bundle->FormatStringFromName(
-      NS_LITERAL_STRING("imapOtherUsersFolderTypeDescription").get(),
+      MOZ_UTF16("imapOtherUsersFolderTypeDescription"),
       params, 1, getter_Copies(folderTypeDesc));
   }
   else if (GetFolderACL()->GetIsFolderShared())
   {
     folderTypeStringID = "imapPersonalSharedFolderTypeName";
     folderTypeDescStringID = "imapPersonalSharedFolderTypeDescription";
   }
   else
@@ -6546,90 +6546,90 @@ 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(NS_LITERAL_STRING("imapAclFullRights").get(),
+    rv = bundle->GetStringFromName(MOZ_UTF16("imapAclFullRights"),
                                    getter_Copies(result));
     aRightsString.Assign(result);
     return rv;
   }
   else
   {
     if (GetCanIReadFolder())
     {
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclReadRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclReadRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIWriteFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclWriteRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclWriteRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIInsertInFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclInsertRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclInsertRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanILookupFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclLookupRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclLookupRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIStoreSeenInFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclSeenRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclSeenRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIDeleteInFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclDeleteRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclDeleteRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIExpungeFolder())
     {
       if (!aRightsString.IsEmpty())
         aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclExpungeRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclExpungeRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanICreateSubfolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclCreateRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclCreateRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIPostToFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclPostRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclPostRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
     if (GetCanIAdministerFolder())
     {
       if (!aRightsString.IsEmpty()) aRightsString.AppendLiteral(", ");
-      bundle->GetStringFromName(NS_LITERAL_STRING("imapAclAdministerRight").get(),
+      bundle->GetStringFromName(MOZ_UTF16("imapAclAdministerRight"),
                                 getter_Copies(curRight));
       aRightsString.Append(curRight);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetFilePath(nsIFile ** aPathName)
@@ -8132,17 +8132,17 @@ nsImapMailFolder::CopyStreamMessage(nsIM
                                             totalMsgString.get(),
                                             dstFolderName.get()
                                             };
 
       nsCOMPtr <nsIStringBundle> bundle;
       rv = IMAPGetStringBundle(getter_AddRefs(bundle));
       NS_ENSURE_SUCCESS(rv, rv);
       rv = bundle->FormatStringFromName(
-        NS_LITERAL_STRING("imapCopyingMessageOf").get(),
+        MOZ_UTF16("imapCopyingMessageOf"),
         formatStrings, 3, getter_Copies(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;
--- a/mailnews/imap/src/nsImapService.cpp
+++ b/mailnews/imap/src/nsImapService.cpp
@@ -2734,26 +2734,26 @@ NS_IMETHODIMP nsImapService::NewChannel(
       nsCOMPtr<nsIStringBundle> bundle;
       rv = IMAPGetStringBundle(getter_AddRefs(bundle));
       NS_ENSURE_SUCCESS(rv, rv);
         // need to convert folder name from mod-utf7 to unicode
       nsAutoString unescapedName;
       if (NS_FAILED(CopyMUTF7toUTF16(fullFolderName, unescapedName)))
         CopyASCIItoUTF16(fullFolderName, unescapedName);
       const PRUnichar *formatStrings[1] = { unescapedName.get() };
-      
+
       rv = bundle->FormatStringFromName(
-        NS_LITERAL_STRING("imapSubscribePrompt").get(),
+        MOZ_UTF16("imapSubscribePrompt"),
         formatStrings, 1, getter_Copies(confirmText));
       NS_ENSURE_SUCCESS(rv,rv);
-      
+
       bool confirmResult = false;
       rv = dialog->Confirm(nullptr, confirmText.get(), &confirmResult);
       NS_ENSURE_SUCCESS(rv, rv);
-      
+
       if (confirmResult)
       {
         nsCOMPtr <nsIImapIncomingServer> imapServer = do_QueryInterface(server);
         if (imapServer)
         {
           nsCOMPtr <nsIURI> subscribeURI;
           // now we have the real folder name to try to subscribe to. Let's try running
           // a subscribe url and returning that as the uri we've created.
--- a/mailnews/import/eudora/src/nsEudoraFilters.cpp
+++ b/mailnews/import/eudora/src/nsEudoraFilters.cpp
@@ -365,17 +365,17 @@ nsresult nsEudoraFilters::Init()
 
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://messenger/locale/importMsgs.properties",
                                    getter_AddRefs(bundle));
   if (NS_SUCCEEDED(rv))
   {
     nsAutoString Eudora(NS_LITERAL_STRING("Eudora"));
     const PRUnichar *moduleName[] = { Eudora.get() };
-    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("ImportModuleFolderName").get(),
+    rv = bundle->FormatStringFromName(MOZ_UTF16("ImportModuleFolderName"),
                                       moduleName, 1, getter_Copies(folderName));
   }
   localRootFolder->GetChildNamed(folderName, getter_AddRefs(m_pMailboxesRoot));
   if (!m_pMailboxesRoot)
   {
     // If no "Eudora Import" folder then this is a
     // migration which just puts it in the root
     m_pMailboxesRoot = localRootFolder;
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -908,22 +908,22 @@ bool nsImportGenericMail::CreateFolder(n
   if (!bundleService)
       return false;
   rv = bundleService->CreateBundle(IMPORT_MSGS_URL, getter_AddRefs(bundle));
   if (NS_FAILED(rv))
       return false;
   nsString folderName;
   if (!m_pName.IsEmpty()) {
     const PRUnichar *moduleName[] = { m_pName.get() };
-    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("ImportModuleFolderName").get(),
+    rv = bundle->FormatStringFromName(MOZ_UTF16("ImportModuleFolderName"),
                                       moduleName, 1,
                                       getter_Copies(folderName));
   }
   else {
-    rv = bundle->GetStringFromName(NS_LITERAL_STRING("DefaultFolderName").get(),
+    rv = bundle->GetStringFromName(MOZ_UTF16("DefaultFolderName"),
                                    getter_Copies(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)) {
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -836,29 +836,29 @@ nsresult nsMsgLocalMailFolder::ConfirmFo
 
       nsAutoString folderName;
       rv = aFolder->GetName(folderName);
       NS_ENSURE_SUCCESS(rv, rv);
       const PRUnichar *formatStrings[1] = { folderName.get() };
 
       nsAutoString deleteFolderDialogTitle;
       rv = bundle->GetStringFromName(
-        NS_LITERAL_STRING("pop3DeleteFolderDialogTitle").get(),
+        MOZ_UTF16("pop3DeleteFolderDialogTitle"),
         getter_Copies(deleteFolderDialogTitle));
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsAutoString deleteFolderButtonLabel;
       rv = bundle->GetStringFromName(
-        NS_LITERAL_STRING("pop3DeleteFolderButtonLabel").get(),
+        MOZ_UTF16("pop3DeleteFolderButtonLabel"),
         getter_Copies(deleteFolderButtonLabel));
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsAutoString confirmationStr;
       rv = bundle->FormatStringFromName(
-        NS_LITERAL_STRING("pop3MoveFolderToTrash").get(), formatStrings, 1,
+        MOZ_UTF16("pop3MoveFolderToTrash"), formatStrings, 1,
         getter_Copies(confirmationStr));
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsCOMPtr<nsIPrompt> dialog(do_GetInterface(docShell));
       if (dialog)
       {
         int32_t buttonPressed = 0;
         // Default the dialog to "cancel".
@@ -3158,18 +3158,18 @@ nsresult nsMsgLocalMailFolder::DisplayMo
       numMsgSoFarString.AppendInt((mCopyState->m_copyingMultipleMessages) ? mCopyState->m_curCopyIndex : 1);
 
       nsAutoString totalMessagesString;
       totalMessagesString.AppendInt(mCopyState->m_totalMsgCount);
       nsString finalString;
       const PRUnichar * stringArray[] = { numMsgSoFarString.get(), totalMessagesString.get(), folderName.get() };
       rv = mCopyState->m_stringBundle->FormatStringFromName(
         (mCopyState->m_isMove) ?
-        NS_LITERAL_STRING("movingMessagesStatus").get() :
-        NS_LITERAL_STRING("copyingMessagesStatus").get(),
+        MOZ_UTF16("movingMessagesStatus") :
+        MOZ_UTF16("copyingMessagesStatus"),
         stringArray, 3, getter_Copies(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;
 
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -865,29 +865,29 @@ NS_IMETHODIMP nsPop3Protocol::OnPromptSt
           // As we're async, calling ProcessProtocolState gets things going
           // again.
           ProcessProtocolState(nullptr, nullptr, 0, 0);
           return NS_OK;
         }
       }
     }
     mLocalBundle->FormatStringFromName(
-      NS_LITERAL_STRING("pop3PreviouslyEnteredPasswordIsInvalidPrompt").get(),
+      MOZ_UTF16("pop3PreviouslyEnteredPasswordIsInvalidPrompt"),
       passwordParams, 2, getter_Copies(passwordPrompt));
   }
   else
     // Otherwise this is the first time we've asked about the server's
     // password so show a first time prompt.
     mLocalBundle->FormatStringFromName(
-      NS_LITERAL_STRING("pop3EnterPasswordPrompt").get(),
+      MOZ_UTF16("pop3EnterPasswordPrompt"),
       passwordParams, 2, getter_Copies(passwordPrompt));
 
   nsString passwordTitle;
   mLocalBundle->GetStringFromName(
-    NS_LITERAL_STRING("pop3EnterPasswordPromptTitle").get(),
+    MOZ_UTF16("pop3EnterPasswordPromptTitle"),
     getter_Copies(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);
 
@@ -1264,17 +1264,17 @@ nsPop3Protocol::Error(const char* err_co
     // so print out that error message!
     nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
     nsString accountName;
     nsresult rv = server->GetPrettyName(accountName);
     NS_ENSURE_SUCCESS(rv, -1);
     const PRUnichar *titleParams[] = { accountName.get() };
     nsString dialogTitle;
     mLocalBundle->FormatStringFromName(
-      NS_LITERAL_STRING("pop3ErrorDialogTitle").get(),
+      MOZ_UTF16("pop3ErrorDialogTitle"),
       titleParams, 1, getter_Copies(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
@@ -1302,17 +1302,17 @@ nsPop3Protocol::Error(const char* err_co
                 if (server)
                   rv = server->GetRealHostName(hostName);
                 if (NS_SUCCEEDED(rv))
                 {
                   nsAutoString hostStr;
                   CopyASCIItoUTF16(hostName, hostStr);
                   const PRUnichar *params[] = { hostStr.get() };
                   mLocalBundle->FormatStringFromName(
-                    NS_LITERAL_STRING("pop3ServerSaid").get(),
+                    MOZ_UTF16("pop3ServerSaid"),
                     params, 1, getter_Copies(serverSaidPrefix));
                 }
 
                 nsAutoString message(alertString);
                 message.AppendLiteral(" ");
                 message.Append(serverSaidPrefix);
                 message.AppendLiteral(" ");
                 message.Append(NS_ConvertASCIItoUTF16(m_commandResponse));
@@ -3438,17 +3438,17 @@ nsPop3Protocol::TopResponse(nsIInputStre
   So just go download the whole thing, and warn the user.
 
     Note that the progress bar will not be accurate in this case.
     Oops. #### */
     m_pop3ConData->truncating_cur_msg = false;
 
     nsString statusTemplate;
     mLocalBundle->GetStringFromName(
-      NS_LITERAL_STRING("pop3ServerDoesNotSupportTopCommand").get(),
+      MOZ_UTF16("pop3ServerDoesNotSupportTopCommand"),
       getter_Copies(statusTemplate));
     if (!statusTemplate.IsEmpty())
     {
       nsAutoCString hostName;
       PRUnichar * statusString = nullptr;
       m_url->GetHost(hostName);
 
       statusString = nsTextFormatter::smprintf(statusTemplate.get(), hostName.get());
--- a/mailnews/local/src/nsPop3Service.cpp
+++ b/mailnews/local/src/nsPop3Service.cpp
@@ -461,20 +461,20 @@ void nsPop3Service::AlertServerBusy(nsIM
   NS_ENSURE_SUCCESS_VOID(rv);
   rv = server->GetPrettyName(accountName);
   NS_ENSURE_SUCCESS_VOID(rv);
 
   const PRUnichar *params[] = { accountName.get() };
   nsString alertString;
   nsString dialogTitle;
   bundle->FormatStringFromName(
-    NS_LITERAL_STRING("pop3ServerBusy").get(),
+    MOZ_UTF16("pop3ServerBusy"),
     params, 1, getter_Copies(alertString));
   bundle->FormatStringFromName(
-    NS_LITERAL_STRING("pop3ErrorDialogTitle").get(),
+    MOZ_UTF16("pop3ErrorDialogTitle"),
     params, 1, getter_Copies(dialogTitle));
   if (!alertString.IsEmpty())
     dialog->Alert(dialogTitle.get(), alertString.get());
 }
 
 NS_IMETHODIMP nsPop3Service::NewChannel(nsIURI *aURI, nsIChannel **_retval)
 {
   NS_ENSURE_ARG_POINTER(aURI);
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -702,17 +702,17 @@ nsresult nsPop3Sink::HandleTempDownloadF
   rv = bundleService->CreateBundle("chrome://messenger/locale/localMsgs.properties", getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
   nsString fromStr, subjectStr, confirmString;
 
   m_newMailParser->m_newMsgHdr->GetMime2DecodedSubject(subjectStr);
   m_newMailParser->m_newMsgHdr->GetMime2DecodedAuthor(fromStr);
   const PRUnichar *params[] = { fromStr.get(), subjectStr.get() };
   bundle->FormatStringFromName(
-    NS_LITERAL_STRING("pop3TmpDownloadError").get(),
+    MOZ_UTF16("pop3TmpDownloadError"),
     params, 2, getter_Copies(confirmString));
   nsCOMPtr<nsIDOMWindow> 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
@@ -144,32 +144,32 @@ 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(
-                       NS_LITERAL_STRING("brandFullName").get(),
+                       MOZ_UTF16("brandFullName"),
                        getter_Copies(brandName));
     if (NS_FAILED(rv)) return false;
 
     nsString loginTitle;
     const PRUnichar *brandStrings[] = { brandName.get() };
     NS_NAMED_LITERAL_STRING(loginTitlePropertyTag, "loginTitle");
     const PRUnichar *dTitlePropertyTag = loginTitlePropertyTag.get();
     rv = bundle->FormatStringFromName(dTitlePropertyTag, brandStrings, 1,
                                       getter_Copies(loginTitle));
     if (NS_FAILED(rv)) return false;
 
     if (aLogin)
     {
       nsString loginText;
-      rv = bundle->GetStringFromName(NS_LITERAL_STRING("loginTextwithName").get(),
+      rv = bundle->GetStringFromName(MOZ_UTF16("loginTextwithName"),
                                      getter_Copies(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);
     }
@@ -253,22 +253,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(NS_LITERAL_STRING("mapiBlindSendWarning").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("mapiBlindSendWarning"),
                                       getter_Copies(warningMsg));
   if (NS_FAILED(rv)) return false;
 
   nsString dontShowAgainMessage;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendDontShowAgain").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("mapiBlindSendDontShowAgain"),
                                       getter_Copies(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;
--- a/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
+++ b/mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
@@ -78,17 +78,17 @@ static void PgpMimeGetNeedsAddonString(n
   if (NS_FAILED(prefs->GetCharPref("mail.pgpmime.addon_url",
                                    getter_Copies(url))))
     return;
 
   NS_ConvertUTF8toUTF16 url16(url);
   const PRUnichar *formatStrings[] = { url16.get() };
 
   nsString result;
-  rv = stringBundle->FormatStringFromName(NS_LITERAL_STRING(PGPMIME_STR_NOT_SUPPORTED_ID).get(),
+  rv = stringBundle->FormatStringFromName(MOZ_UTF16(PGPMIME_STR_NOT_SUPPORTED_ID),
                                           formatStrings, 1, getter_Copies(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
@@ -738,17 +738,17 @@ nsMimeBaseEmitter::GenerateDateString(co
     {
       if (displaySenderTimezone)
       {
         // offset of local time from UTC in minutes
         int32_t senderoffset = (explodedMsgTime.tm_params.tp_gmt_offset +
                                 explodedMsgTime.tm_params.tp_dst_offset) / 60;
         // append offset to date string
         PRUnichar *tzstring =
-          nsTextFormatter::smprintf(NS_LITERAL_STRING(" %+05d").get(),
+          nsTextFormatter::smprintf(MOZ_UTF16(" %+05d"),
                                     (senderoffset / 60 * 100) +
                                     (senderoffset % 60));
         formattedDateString.Append(tzstring);
         nsTextFormatter::smprintf_free(tzstring);
       }
 
       CopyUTF16toUTF8(formattedDateString, formattedDate);
     }
--- a/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeHtmlEmitter.cpp
@@ -414,17 +414,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(NS_LITERAL_STRING("attachmentsPrintHeader").get(),
+      bundle->GetStringFromName(MOZ_UTF16("attachmentsPrintHeader"),
                                 getter_Copies(attachmentsHeader)); 
 
       UtilityWrite("<legend class=\"mimeAttachmentHeaderName\">");
       nsCString escapedName;
       escapedName.Adopt(MsgEscapeHTML(NS_ConvertUTF16toUTF8(attachmentsHeader).get()));
       UtilityWrite(escapedName.get());
       UtilityWrite("</legend>");
     }
--- a/mailnews/mime/src/mimemsg.cpp
+++ b/mailnews/mime/src/mimemsg.cpp
@@ -847,26 +847,26 @@ MimeMessage_partial_message_html(const c
   nsCString partialMsgHtml;
   nsCString item;
 
   partialMsgHtml.AppendLiteral("<div style=\"margin: 1em auto; border: 1px solid black; width: 80%\">");
   partialMsgHtml.AppendLiteral("<div style=\"margin: 5px; padding: 10px; border: 1px solid gray; font-weight: bold; text-align: center;\">");
 
   partialMsgHtml.AppendLiteral("<span style=\"font-size: 120%;\">");
   if (msgBaseTruncated)
-    item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_TRUNCATED").get()));
+    item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_TRUNCATED")));
   else
-    item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_NOT_DOWNLOADED").get()));
+    item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_NOT_DOWNLOADED")));
   partialMsgHtml += item;
   partialMsgHtml.AppendLiteral("</span><hr>");
 
   if (msgBaseTruncated)
-    item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_TRUNCATED_EXPLANATION").get()));
+    item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_TRUNCATED_EXPLANATION")));
   else
-    item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_NOT_DOWNLOADED_EXPLANATION").get()));
+    item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_NOT_DOWNLOADED_EXPLANATION")));
   partialMsgHtml += item;
   partialMsgHtml.AppendLiteral("<br><br>");
 
   partialMsgHtml.AppendLiteral("<a href=\"");
   partialMsgHtml.Append(orig_url);
 
   if (msgIdPtr) {
     partialMsgHtml.AppendLiteral("&messageid=");
@@ -882,17 +882,17 @@ MimeMessage_partial_message_html(const c
 
     MsgEscapeString(nsDependentCString(uidl), nsINetUtil::ESCAPE_XALPHAS,
                     item);
 
     partialMsgHtml.Append(item);
   }
 
   partialMsgHtml.AppendLiteral("\">");
-  item.Adopt(MimeGetStringByName(NS_LITERAL_STRING("MIME_MSG_PARTIAL_CLICK_FOR_REST").get()));
+  item.Adopt(MimeGetStringByName(MOZ_UTF16("MIME_MSG_PARTIAL_CLICK_FOR_REST")));
   partialMsgHtml += item;
   partialMsgHtml.AppendLiteral("</a>");
 
   partialMsgHtml.AppendLiteral("</div></div>");
 
   return ToNewCString(partialMsgHtml);
 }
 
--- a/mailnews/news/src/nsNNTPNewsgroupList.cpp
+++ b/mailnews/news/src/nsNNTPNewsgroupList.cpp
@@ -307,17 +307,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(NS_LITERAL_STRING("noNewMessages").get(), getter_Copies(statusString));
+    rv = bundle->GetStringFromName(MOZ_UTF16("noNewMessages"), getter_Copies(statusString));
     NS_ENSURE_SUCCESS(rv, rv);
 
     SetProgressStatus(statusString.get());
   }
 
   if (maxextra <= 0 || last_possible < first_possible || last_possible < 1)
   {
     *status=0;
@@ -882,17 +882,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 PRUnichar *formatStrings[2] = { firstStr.get(), lastStr.get() };
-      rv = bundle->FormatStringFromName(NS_LITERAL_STRING("downloadingArticles").get(), formatStrings, 2, getter_Copies(statusString));
+      rv = bundle->FormatStringFromName(MOZ_UTF16("downloadingArticles"), formatStrings, 2, getter_Copies(statusString));
       NS_ENSURE_SUCCESS(rv, rv);
 
       SetProgressStatus(statusString.get());
     }
   }
 
   if (newstatus)
     *newstatus=0;
@@ -1273,24 +1273,24 @@ nsNNTPNewsgroupList::UpdateStatus(bool f
   if (!NS_SUCCEEDED(rv))
     return;
 
   if (filtering)
   {
     NS_ConvertUTF8toUTF16 header(m_filterHeaders[m_currentXHDRIndex]);
     const PRUnichar *formatStrings[4] = { header.get(),
       numDownloadedStr.get(), totalToDownloadStr.get(), newsgroupName.get() };
-    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("newNewsgroupFilteringHeaders").get(),
+    rv = bundle->FormatStringFromName(MOZ_UTF16("newNewsgroupFilteringHeaders"),
       formatStrings, 4, getter_Copies(statusString));
   }
   else
   {
     const PRUnichar *formatStrings[3] = { numDownloadedStr.get(),
       totalToDownloadStr.get(), newsgroupName.get() };
-    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("newNewsgroupHeaders").get(),
+    rv = bundle->FormatStringFromName(MOZ_UTF16("newNewsgroupHeaders"),
       formatStrings, 3, getter_Copies(statusString));
   }
   if (!NS_SUCCEEDED(rv))
     return;
 
   SetProgressStatus(statusString.get());
   m_lastStatusUpdate = PR_Now();
 
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -1027,17 +1027,17 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI 
       nsAutoString unescapedName;
       rv = NS_MsgDecodeUnescapeURLPath(group, unescapedName);
       NS_ENSURE_SUCCESS(rv,rv);
 
       bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
       const PRUnichar *formatStrings[1] = { unescapedName.get() };
 
       rv = bundle->FormatStringFromName(
-        NS_LITERAL_STRING("autoSubscribeText").get(), formatStrings, 1,
+        MOZ_UTF16("autoSubscribeText"), formatStrings, 1,
         getter_Copies(confirmText));
       NS_ENSURE_SUCCESS(rv,rv);
 
       bool confirmResult = false;
       rv = dialog->Confirm(nullptr, confirmText.get(), &confirmResult);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (confirmResult)
@@ -2776,17 +2776,17 @@ nsresult nsNNTPProtocol::ReadNewsList(ns
       char rate_buf[RATE_STR_BUF_LEN];
       PR_snprintf(rate_buf,RATE_STR_BUF_LEN,"%.1f", rate);
 
       nsAutoString numGroupsStr;
       numGroupsStr.AppendInt(mNumGroupsListed);
       NS_ConvertASCIItoUTF16 rateStr(rate_buf);
 
       const PRUnichar *formatStrings[3] = { numGroupsStr.get(), bytesStr.get(), rateStr.get()};
-      rv = bundle->FormatStringFromName(NS_LITERAL_STRING("bytesReceived").get(),
+      rv = bundle->FormatStringFromName(MOZ_UTF16("bytesReceived"),
         formatStrings, 3,
         getter_Copies(statusString));
 
       rv = msgStatusFeedback->ShowStatusString(statusString);
       if (NS_FAILED(rv)) {
         PR_Free(lineToFree);
         return rv;
       }
@@ -3549,17 +3549,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(NS_LITERAL_STRING("brandFullName").get(),
+  rv = brandBundle->GetStringFromName(MOZ_UTF16("brandFullName"),
                                       getter_Copies(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
@@ -192,17 +192,17 @@ bool nsNewsDownloader::GetNextHdrToRetri
     nsAutoString totalStr;
     totalStr.AppendInt(m_keysToDownload.Length());
     nsString prettiestName;
     nsString statusString;
 
     m_folder->GetPrettiestName(prettiestName);
 
     const PRUnichar *formatStrings[3] = { firstStr.get(), totalStr.get(), prettiestName.get() };
-    rv = bundle->FormatStringFromName(NS_LITERAL_STRING("downloadingArticlesForOffline").get(),
+    rv = bundle->FormatStringFromName(MOZ_UTF16("downloadingArticlesForOffline"),
                                       formatStrings, 3, getter_Copies(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
@@ -1354,17 +1354,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(NS_LITERAL_STRING("enterUserPassTitle").get(),
+      bundle->GetStringFromName(MOZ_UTF16("enterUserPassTitle"),
         getter_Copies(promptTitle));
 
       nsString serverName;
       nsCOMPtr<nsIMsgIncomingServer> server;
       rv = GetServer(getter_AddRefs(server));
       NS_ENSURE_SUCCESS(rv, rv);
 
       server->GetPrettyName(serverName);
@@ -1376,21 +1376,21 @@ nsMsgNewsFolder::GetAuthenticationCreden
       bool singleSignon = true;
       nntpServer->GetSingleSignon(&singleSignon);
 
       const PRUnichar *params[2];
       params[0] = mName.get();
       params[1] = serverName.get();
       if (singleSignon)
         bundle->FormatStringFromName(
-          NS_LITERAL_STRING("enterUserPassServer").get(),
+          MOZ_UTF16("enterUserPassServer"),
           &params[1], 1, getter_Copies(promptText));
       else
         bundle->FormatStringFromName(
-          NS_LITERAL_STRING("enterUserPassGroup").get(),
+          MOZ_UTF16("enterUserPassGroup"),
           params, 2, getter_Copies(promptText));
 
       // Fill the signon url for the dialog
       nsString signonURL;
       rv = CreateNewsgroupUrlForSignon(nullptr, signonURL);
       NS_ENSURE_SUCCESS(rv, rv);
 
       // Prefill saved username/password
--- a/mailnews/news/src/nsNntpIncomingServer.cpp
+++ b/mailnews/news/src/nsNntpIncomingServer.cpp
@@ -1573,17 +1573,17 @@ nsNntpIncomingServer::GroupNotFound(nsIM
   NS_ENSURE_SUCCESS(rv,rv);
 
   NS_ConvertUTF8toUTF16 hostStr(hostname);
 
   nsString groupName(aName);
   const PRUnichar *formatStrings[2] = { groupName.get(), hostStr.get() };
   nsString confirmText;
   rv = bundle->FormatStringFromName(
-                    NS_LITERAL_STRING("autoUnsubscribeText").get(),
+                    MOZ_UTF16("autoUnsubscribeText"),
                     formatStrings, 2,
                     getter_Copies(confirmText));
   NS_ENSURE_SUCCESS(rv,rv);
 
   bool confirmResult = false;
   rv = prompt->Confirm(nullptr, confirmText.get(), &confirmResult);
   NS_ENSURE_SUCCESS(rv,rv);