bug 949821 - use MOZ_UTF16 more and NS_LITERAL_STRING less r=froydnj
authorTrevor Saunders <trev.saunders@gmail.com>
Thu, 12 Dec 2013 20:50:01 -0500
changeset 177659 0fe105b41eda001383c2793dd5347d16234d67ea
parent 177658 34dba94651ccffb314a7506eef7e6440201517a0
child 177660 73af05ec57fc57f06defaa6b4a1e16d8054f428e
push id462
push userraliiev@mozilla.com
push dateTue, 22 Apr 2014 00:22:30 +0000
treeherdermozilla-release@ac5db8c74ac0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs949821
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 949821 - use MOZ_UTF16 more and NS_LITERAL_STRING less r=froydnj
accessible/src/generic/Accessible.cpp
accessible/src/generic/ApplicationAccessible.cpp
browser/components/shell/src/nsGNOMEShellService.cpp
browser/components/shell/src/nsWindowsShellService.cpp
caps/src/nsScriptSecurityManager.cpp
content/base/src/EventSource.cpp
content/base/src/WebSocket.cpp
content/base/src/nsContentUtils.cpp
content/base/src/nsPlainTextSerializer.cpp
content/canvas/src/WebGLContext.cpp
content/html/content/src/HTMLInputElement.cpp
content/html/document/src/ImageDocument.cpp
content/html/document/src/PluginDocument.cpp
content/html/document/src/nsHTMLDocument.cpp
content/mathml/content/src/nsMathMLElement.cpp
content/svg/content/src/SVGLength.cpp
content/svg/content/src/SVGNumberList.cpp
content/svg/content/src/SVGPathSegUtils.cpp
content/svg/content/src/SVGPointList.cpp
content/svg/content/src/nsSVGAngle.cpp
content/svg/content/src/nsSVGLength2.cpp
content/svg/content/src/nsSVGTransform.cpp
content/svg/content/src/nsSVGViewBox.cpp
content/xml/document/src/nsXMLContentSink.cpp
content/xslt/src/xslt/txMozillaXSLTProcessor.cpp
docshell/base/nsDSURIContentListener.cpp
docshell/base/nsDocShell.cpp
dom/base/nsGlobalWindow.cpp
dom/camera/GonkCameraControl.cpp
dom/plugins/ipc/PluginHangUIParent.cpp
dom/src/geolocation/nsGeolocation.cpp
dom/system/gonk/AudioManager.cpp
editor/composer/src/nsEditingSession.cpp
editor/libeditor/html/nsHTMLEditor.cpp
embedding/components/commandhandler/src/nsCommandManager.cpp
extensions/cookie/nsPermissionManager.cpp
extensions/gio/nsGIOProtocolHandler.cpp
extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
extensions/pref/autoconfig/src/nsAutoConfig.cpp
extensions/pref/autoconfig/src/nsReadConfig.cpp
gfx/thebes/gfxPlatform.cpp
image/decoders/icon/gtk/nsIconChannel.cpp
intl/uconv/src/nsCharsetConverterManager.cpp
intl/unicharutil/src/nsEntityConverter.cpp
layout/generic/nsTextFrame.cpp
layout/printing/nsPrintData.cpp
layout/style/ErrorReporter.cpp
layout/xul/tree/nsTreeBodyFrame.cpp
modules/libpref/src/Preferences.cpp
netwerk/base/src/nsIOService.cpp
netwerk/cookie/nsCookieService.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
netwerk/streamconv/converters/nsIndexedToHTML.cpp
netwerk/streamconv/converters/nsTXTToHTMLConv.cpp
parser/html/nsHtml5PlainTextUtils.cpp
rdf/base/src/nsRDFContainerUtils.cpp
rdf/base/src/nsRDFContentSink.cpp
rdf/datasource/src/nsFileSystemDataSource.cpp
security/manager/boot/src/nsSecurityWarningDialogs.cpp
security/manager/pki/src/nsNSSDialogs.cpp
security/manager/ssl/src/nsCertOverrideService.cpp
security/manager/ssl/src/nsCrypto.cpp
toolkit/components/commandlines/nsCommandLine.cpp
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/filepicker/nsFileView.cpp
toolkit/components/places/Database.cpp
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/system/gnome/nsAlertsIconListener.cpp
toolkit/xre/ProfileReset.cpp
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsNativeAppSupportOS2.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
uriloader/exthandler/os2/nsOSHelperAppService.cpp
widget/android/nsAppShell.cpp
widget/android/nsPrintOptionsAndroid.cpp
widget/gonk/nsWindow.cpp
widget/gtk/nsDeviceContextSpecG.cpp
widget/gtk/nsPrintDialogGTK.cpp
widget/gtk/nsSound.cpp
widget/gtk/nsWindow.cpp
widget/os2/nsRwsService.cpp
widget/qt/nsWindow.cpp
widget/windows/AudioSession.cpp
widget/windows/nsDataObj.cpp
widget/windows/nsDeviceContextSpecWin.cpp
widget/windows/nsTextStore.cpp
widget/windows/winrt/MetroContracts.cpp
widget/xpwidgets/nsBaseFilePicker.cpp
xpcom/base/nsMemoryImpl.cpp
xpcom/base/nsMemoryReporterManager.cpp
xpcom/components/ManifestParser.cpp
xpcom/tests/TestObserverService.cpp
xpcom/tests/TestStrings.cpp
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/accessible/src/generic/Accessible.cpp
+++ b/accessible/src/generic/Accessible.cpp
@@ -3262,46 +3262,46 @@ KeyBinding::ToPlatformFormat(nsAString& 
     stringBundleService->CreateBundle(
       "chrome://global-platform/locale/platformKeys.properties",
       getter_AddRefs(keyStringBundle));
 
   if (!keyStringBundle)
     return;
 
   nsAutoString separator;
-  keyStringBundle->GetStringFromName(NS_LITERAL_STRING("MODIFIER_SEPARATOR").get(),
+  keyStringBundle->GetStringFromName(MOZ_UTF16("MODIFIER_SEPARATOR"),
                                      getter_Copies(separator));
 
   nsAutoString modifierName;
   if (mModifierMask & kControl) {
-    keyStringBundle->GetStringFromName(NS_LITERAL_STRING("VK_CONTROL").get(),
+    keyStringBundle->GetStringFromName(MOZ_UTF16("VK_CONTROL"),
                                        getter_Copies(modifierName));
 
     aValue.Append(modifierName);
     aValue.Append(separator);
   }
 
   if (mModifierMask & kAlt) {
-    keyStringBundle->GetStringFromName(NS_LITERAL_STRING("VK_ALT").get(),
+    keyStringBundle->GetStringFromName(MOZ_UTF16("VK_ALT"),
                                        getter_Copies(modifierName));
 
     aValue.Append(modifierName);
     aValue.Append(separator);
   }
 
   if (mModifierMask & kShift) {
-    keyStringBundle->GetStringFromName(NS_LITERAL_STRING("VK_SHIFT").get(),
+    keyStringBundle->GetStringFromName(MOZ_UTF16("VK_SHIFT"),
                                        getter_Copies(modifierName));
 
     aValue.Append(modifierName);
     aValue.Append(separator);
   }
 
   if (mModifierMask & kMeta) {
-    keyStringBundle->GetStringFromName(NS_LITERAL_STRING("VK_META").get(),
+    keyStringBundle->GetStringFromName(MOZ_UTF16("VK_META"),
                                        getter_Copies(modifierName));
 
     aValue.Append(modifierName);
     aValue.Append(separator);
   }
 
   aValue.Append(mKey);
 }
--- a/accessible/src/generic/ApplicationAccessible.cpp
+++ b/accessible/src/generic/ApplicationAccessible.cpp
@@ -77,17 +77,17 @@ ApplicationAccessible::Name(nsString& aN
 
   nsCOMPtr<nsIStringBundle> bundle;
   nsresult rv = bundleService->CreateBundle("chrome://branding/locale/brand.properties",
                                             getter_AddRefs(bundle));
   if (NS_FAILED(rv))
     return eNameOK;
 
   nsXPIDLString appName;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                  getter_Copies(appName));
   if (NS_FAILED(rv) || appName.IsEmpty()) {
     NS_WARNING("brandShortName not found, using default app name");
     appName.AssignLiteral("Gecko based application");
   }
 
   aName.Assign(appName);
   return eNameOK;
--- a/browser/components/shell/src/nsGNOMEShellService.cpp
+++ b/browser/components/shell/src/nsGNOMEShellService.cpp
@@ -280,17 +280,17 @@ nsGNOMEShellService::SetDefaultBrowser(b
       do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     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> appInfo;
     rv = giovfs->CreateAppFromCommand(mAppPath,
                                       id,
                                       getter_AddRefs(appInfo));
@@ -425,17 +425,17 @@ nsGNOMEShellService::SetDesktopBackgroun
   nsString brandName;
   nsCID bundleCID = NS_STRINGBUNDLESERVICE_CID;
   nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(bundleCID));
   if (bundleService) {
     nsCOMPtr<nsIStringBundle> brandBundle;
     rv = bundleService->CreateBundle(BRAND_PROPERTIES,
                                      getter_AddRefs(brandBundle));
     if (NS_SUCCEEDED(rv) && brandBundle) {
-      rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+      rv = brandBundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                           getter_Copies(brandName));
       NS_ENSURE_SUCCESS(rv, rv);
     }
   }
 
   // build the file name
   filePath.Append('/');
   filePath.Append(NS_ConvertUTF16toUTF8(brandName));
--- a/browser/components/shell/src/nsWindowsShellService.cpp
+++ b/browser/components/shell/src/nsWindowsShellService.cpp
@@ -862,17 +862,17 @@ nsWindowsShellService::SetDesktopBackgro
   nsCOMPtr<nsIStringBundle> shellBundle;
   rv = bundleService->CreateBundle(SHELLSERVICE_PROPERTIES,
                                    getter_AddRefs(shellBundle));
   NS_ENSURE_SUCCESS(rv, rv);
  
   // e.g. "Desktop Background.bmp"
   nsString fileLeafName;
   rv = shellBundle->GetStringFromName
-                      (NS_LITERAL_STRING("desktopBackgroundLeafNameWin").get(),
+                      (MOZ_UTF16("desktopBackgroundLeafNameWin"),
                        getter_Copies(fileLeafName));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // get the profile root directory
   nsCOMPtr<nsIFile> file;
   rv = NS_GetSpecialDirectory(NS_APP_APPLICATION_REGISTRY_DIR,
                               getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv, rv);
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -1167,17 +1167,17 @@ nsScriptSecurityManager::CheckLoadURIWit
                              nsIProtocolHandler::URI_LOADABLE_BY_ANYONE,
                              &hasFlags);
     NS_ENSURE_SUCCESS(rv, rv);
     if (!hasFlags) {
         nsXPIDLString message;
         NS_ConvertASCIItoUTF16 ucsTargetScheme(targetScheme);
         const PRUnichar* formatStrings[] = { ucsTargetScheme.get() };
         rv = sStrBundle->
-            FormatStringFromName(NS_LITERAL_STRING("ProtocolFlagError").get(),
+            FormatStringFromName(MOZ_UTF16("ProtocolFlagError"),
                                  formatStrings,
                                  ArrayLength(formatStrings),
                                  getter_Copies(message));
         if (NS_SUCCEEDED(rv)) {
             nsCOMPtr<nsIConsoleService> console(
               do_GetService("@mozilla.org/consoleservice;1"));
             NS_ENSURE_TRUE(console, NS_ERROR_FAILURE);
 
--- a/content/base/src/EventSource.cpp
+++ b/content/base/src/EventSource.cpp
@@ -982,21 +982,21 @@ EventSource::ConsoleError()
   nsresult rv = mSrc->GetSpec(targetSpec);
   NS_ENSURE_SUCCESS(rv, rv);
 
   NS_ConvertUTF8toUTF16 specUTF16(targetSpec);
   const PRUnichar *formatStrings[] = { specUTF16.get() };
 
   if (mReadyState == CONNECTING && !mInterrupted) {
     rv = PrintErrorOnConsole("chrome://global/locale/appstrings.properties",
-                             NS_LITERAL_STRING("connectionFailure").get(),
+                             MOZ_UTF16("connectionFailure"),
                              formatStrings, ArrayLength(formatStrings));
   } else {
     rv = PrintErrorOnConsole("chrome://global/locale/appstrings.properties",
-                             NS_LITERAL_STRING("netInterrupt").get(),
+                             MOZ_UTF16("netInterrupt"),
                              formatStrings, ArrayLength(formatStrings));
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 nsresult
--- a/content/base/src/WebSocket.cpp
+++ b/content/base/src/WebSocket.cpp
@@ -171,21 +171,21 @@ WebSocket::ConsoleError()
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to get targetSpec");
   } else {
     NS_ConvertUTF8toUTF16 specUTF16(targetSpec);
     const PRUnichar* formatStrings[] = { specUTF16.get() };
 
     if (mReadyState < WebSocket::OPEN) {
       PrintErrorOnConsole("chrome://global/locale/appstrings.properties",
-                          NS_LITERAL_STRING("connectionFailure").get(),
+                          MOZ_UTF16("connectionFailure"),
                           formatStrings, ArrayLength(formatStrings));
     } else {
       PrintErrorOnConsole("chrome://global/locale/appstrings.properties",
-                          NS_LITERAL_STRING("netInterrupt").get(),
+                          MOZ_UTF16("netInterrupt"),
                           formatStrings, ArrayLength(formatStrings));
     }
   }
   /// todo some specific errors - like for message too large
   return rv;
 }
 
 
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -526,22 +526,22 @@ nsContentUtils::InitializeModifierString
   nsXPIDLString shiftModifier;
   nsXPIDLString metaModifier;
   nsXPIDLString osModifier;
   nsXPIDLString altModifier;
   nsXPIDLString controlModifier;
   nsXPIDLString modifierSeparator;
   if (bundle) {
     //macs use symbols for each modifier key, so fetch each from the bundle, which also covers i18n
-    bundle->GetStringFromName(NS_LITERAL_STRING("VK_SHIFT").get(), getter_Copies(shiftModifier));
-    bundle->GetStringFromName(NS_LITERAL_STRING("VK_META").get(), getter_Copies(metaModifier));
-    bundle->GetStringFromName(NS_LITERAL_STRING("VK_WIN").get(), getter_Copies(osModifier));
-    bundle->GetStringFromName(NS_LITERAL_STRING("VK_ALT").get(), getter_Copies(altModifier));
-    bundle->GetStringFromName(NS_LITERAL_STRING("VK_CONTROL").get(), getter_Copies(controlModifier));
-    bundle->GetStringFromName(NS_LITERAL_STRING("MODIFIER_SEPARATOR").get(), getter_Copies(modifierSeparator));
+    bundle->GetStringFromName(MOZ_UTF16("VK_SHIFT"), getter_Copies(shiftModifier));
+    bundle->GetStringFromName(MOZ_UTF16("VK_META"), getter_Copies(metaModifier));
+    bundle->GetStringFromName(MOZ_UTF16("VK_WIN"), getter_Copies(osModifier));
+    bundle->GetStringFromName(MOZ_UTF16("VK_ALT"), getter_Copies(altModifier));
+    bundle->GetStringFromName(MOZ_UTF16("VK_CONTROL"), getter_Copies(controlModifier));
+    bundle->GetStringFromName(MOZ_UTF16("MODIFIER_SEPARATOR"), getter_Copies(modifierSeparator));
   }
   //if any of these don't exist, we get  an empty string
   sShiftText = new nsString(shiftModifier);
   sMetaText = new nsString(metaModifier);
   sOSText = new nsString(osModifier);
   sAltText = new nsString(altModifier);
   sControlText = new nsString(controlModifier);
   sModifierSeparator = new nsString(modifierSeparator);  
@@ -6001,22 +6001,22 @@ void nsContentUtils::RemoveNewlines(nsSt
   aString.StripChars(badChars);
 }
 
 void
 nsContentUtils::PlatformToDOMLineBreaks(nsString &aString)
 {
   if (aString.FindChar(PRUnichar('\r')) != -1) {
     // Windows linebreaks: Map CRLF to LF:
-    aString.ReplaceSubstring(NS_LITERAL_STRING("\r\n").get(),
-                             NS_LITERAL_STRING("\n").get());
+    aString.ReplaceSubstring(MOZ_UTF16("\r\n"),
+                             MOZ_UTF16("\n"));
 
     // Mac linebreaks: Map any remaining CR to LF:
-    aString.ReplaceSubstring(NS_LITERAL_STRING("\r").get(),
-                             NS_LITERAL_STRING("\n").get());
+    aString.ReplaceSubstring(MOZ_UTF16("\r"),
+                             MOZ_UTF16("\n"));
   }
 }
 
 void
 nsContentUtils::PopulateStringFromStringBuffer(nsStringBuffer* aBuf,
                                                nsAString& aResultString)
 {
   MOZ_ASSERT(aBuf, "Expecting a non-null string buffer");
--- a/content/base/src/nsPlainTextSerializer.cpp
+++ b/content/base/src/nsPlainTextSerializer.cpp
@@ -565,17 +565,17 @@ nsPlainTextSerializer::DoOpenContainer(n
   else if (aTag == nsGkAtoms::td || aTag == nsGkAtoms::th) {
     // We must make sure that the content of two table cells get a
     // space between them.
 
     // To make the separation between cells most obvious and
     // importable, we use a TAB.
     if (GetLastBool(mHasWrittenCellsForRow)) {
       // Bypass |Write| so that the TAB isn't compressed away.
-      AddToLine(NS_LITERAL_STRING("\t").get(), 1);
+      AddToLine(MOZ_UTF16("\t"), 1);
       mInWhitespace = true;
     }
     else if (mHasWrittenCellsForRow.IsEmpty()) {
       // We don't always see a <tr> (nor a <table>) before the <td> if we're
       // copying part of a table
       PushBool(mHasWrittenCellsForRow, true); // will never be popped
     }
     else {
@@ -1168,17 +1168,17 @@ nsPlainTextSerializer::Output(nsString& 
   }
   mOutputString->Append(aString);
 }
 
 static bool
 IsSpaceStuffable(const PRUnichar *s)
 {
   if (s[0] == '>' || s[0] == ' ' || s[0] == kNBSP ||
-      nsCRT::strncmp(s, NS_LITERAL_STRING("From ").get(), 5) == 0)
+      nsCRT::strncmp(s, MOZ_UTF16("From "), 5) == 0)
     return true;
   else
     return false;
 }
 
 /**
  * This function adds a piece of text to the current stored line. If we are
  * wrapping text and the stored line will become too long, a suitable
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -78,17 +78,17 @@ WebGLMemoryPressureObserver::Observe(nsI
         return NS_OK;
 
     bool wantToLoseContext = true;
 
     if (!mContext->mCanLoseContextInForeground &&
         ProcessPriorityManager::CurrentProcessIsForeground())
         wantToLoseContext = false;
     else if (!nsCRT::strcmp(aSomeData,
-                            NS_LITERAL_STRING("heap-minimize").get()))
+                            MOZ_UTF16("heap-minimize")))
         wantToLoseContext = mContext->mLoseContextOnHeapMinimize;
 
     if (wantToLoseContext)
         mContext->ForceLoseContext();
 
     return NS_OK;
 }
 
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -7021,25 +7021,25 @@ HTMLInputElement::SetFilePickerFiltersFr
 
     int32_t filterMask = 0;
     nsString filterName;
     nsString extensionListStr;
 
     // First, check for image/audio/video filters...
     if (token.EqualsLiteral("image/*")) {
       filterMask = nsIFilePicker::filterImages;
-      filterBundle->GetStringFromName(NS_LITERAL_STRING("imageFilter").get(),
+      filterBundle->GetStringFromName(MOZ_UTF16("imageFilter"),
                                       getter_Copies(extensionListStr));
     } else if (token.EqualsLiteral("audio/*")) {
       filterMask = nsIFilePicker::filterAudio;
-      filterBundle->GetStringFromName(NS_LITERAL_STRING("audioFilter").get(),
+      filterBundle->GetStringFromName(MOZ_UTF16("audioFilter"),
                                       getter_Copies(extensionListStr));
     } else if (token.EqualsLiteral("video/*")) {
       filterMask = nsIFilePicker::filterVideo;
-      filterBundle->GetStringFromName(NS_LITERAL_STRING("videoFilter").get(),
+      filterBundle->GetStringFromName(MOZ_UTF16("videoFilter"),
                                       getter_Copies(extensionListStr));
     } else {
       //... if no image/audio/video filter is found, check mime types filters
       nsCOMPtr<nsIMIMEInfo> mimeInfo;
       if (NS_FAILED(mimeService->GetFromTypeAndExtension(
                       NS_ConvertUTF16toUTF8(token),
                       EmptyCString(), // No extension
                       getter_AddRefs(mimeInfo))) ||
--- a/content/html/document/src/ImageDocument.cpp
+++ b/content/html/document/src/ImageDocument.cpp
@@ -739,17 +739,17 @@ ImageDocument::UpdateTitleAndCharset()
   }
 
   nsXPIDLString status;
   if (mImageIsResized) {
     nsAutoString ratioStr;
     ratioStr.AppendInt(NSToCoordFloor(GetRatio() * 100));
 
     const PRUnichar* formatString[1] = { ratioStr.get() };
-    mStringBundle->FormatStringFromName(NS_LITERAL_STRING("ScaledImage").get(),
+    mStringBundle->FormatStringFromName(MOZ_UTF16("ScaledImage"),
                                         formatString, 1,
                                         getter_Copies(status));
   }
 
   static const char* const formatNames[4] = 
   {
     "ImageTitleWithNeitherDimensionsNorFile",
     "ImageTitleWithoutDimensions",
--- a/content/html/document/src/PluginDocument.cpp
+++ b/content/html/document/src/PluginDocument.cpp
@@ -160,17 +160,17 @@ PluginDocument::StartDocumentLoad(const 
                                   bool                aReset,
                                   nsIContentSink*     aSink)
 {
   // do not allow message panes to host full-page plugins
   // returning an error causes helper apps to take over
   nsCOMPtr<nsIDocShellTreeItem> dsti (do_QueryInterface(aContainer));
   if (dsti) {
     bool isMsgPane = false;
-    dsti->NameEquals(NS_LITERAL_STRING("messagepane").get(), &isMsgPane);
+    dsti->NameEquals(MOZ_UTF16("messagepane"), &isMsgPane);
     if (isMsgPane) {
       return NS_ERROR_FAILURE;
     }
   }
 
   nsresult rv =
     MediaDocument::StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer,
                                      aDocListener, aReset, aSink);
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -735,17 +735,17 @@ nsHTMLDocument::StartDocumentLoad(const 
     nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
     NS_ASSERTION(NS_SUCCEEDED(rv) && bundleService, "The bundle service could not be loaded");
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://global/locale/browser.properties",
                                      getter_AddRefs(bundle));
     NS_ASSERTION(NS_SUCCEEDED(rv) && bundle, "chrome://global/locale/browser.properties could not be loaded");
     nsXPIDLString title;
     if (bundle) {
-      bundle->GetStringFromName(NS_LITERAL_STRING("plainText.wordWrap").get(), getter_Copies(title));
+      bundle->GetStringFromName(MOZ_UTF16("plainText.wordWrap"), getter_Copies(title));
     }
     SetSelectedStyleSheetSet(title);
   }
 
   // parser the content of the URI
   mParser->Parse(uri, nullptr, (void *)this);
 
   return rv;
--- a/content/mathml/content/src/nsMathMLElement.cpp
+++ b/content/mathml/content/src/nsMathMLElement.cpp
@@ -1069,18 +1069,18 @@ nsMathMLElement::SetAttr(int32_t aNameSp
   // is important here!  The attribute is not set until SetAttr returns, and
   // we will need the updated attribute value because notifying the document
   // that content states have changed will call IntrinsicState, which will try
   // to get updated information about the visitedness from Link.
   if (aName == nsGkAtoms::href &&
       (aNameSpaceID == kNameSpaceID_None ||
        aNameSpaceID == kNameSpaceID_XLink)) {
     if (aNameSpaceID == kNameSpaceID_XLink) {
-      WarnDeprecated(NS_LITERAL_STRING("xlink:href").get(),
-                     NS_LITERAL_STRING("href").get(), OwnerDoc());
+      WarnDeprecated(MOZ_UTF16("xlink:href"),
+                     MOZ_UTF16("href"), OwnerDoc());
     }
     Link::ResetLinkState(!!aNotify, true);
   }
 
   return rv;
 }
 
 nsresult
--- a/content/svg/content/src/SVGLength.cpp
+++ b/content/svg/content/src/SVGLength.cpp
@@ -19,17 +19,17 @@ namespace mozilla {
 static void GetUnitString(nsAString& unit, uint16_t unitType);
 static uint16_t GetUnitTypeForString(const nsAString& unitStr);
 
 void
 SVGLength::GetValueAsString(nsAString &aValue) const
 {
   PRUnichar buf[24];
   nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-                            NS_LITERAL_STRING("%g").get(),
+                            MOZ_UTF16("%g"),
                             (double)mValue);
   aValue.Assign(buf);
 
   nsAutoString unitString;
   GetUnitString(unitString, mUnit);
   aValue.Append(unitString);
 }
 
--- a/content/svg/content/src/SVGNumberList.cpp
+++ b/content/svg/content/src/SVGNumberList.cpp
@@ -29,17 +29,17 @@ SVGNumberList::GetValueAsString(nsAStrin
 {
   aValue.Truncate();
   PRUnichar buf[24];
   uint32_t last = mNumbers.Length() - 1;
   for (uint32_t i = 0; i < mNumbers.Length(); ++i) {
     // Would like to use aValue.AppendPrintf("%f", mNumbers[i]), but it's not
     // possible to always avoid trailing zeros.
     nsTextFormatter::snprintf(buf, ArrayLength(buf),
-                              NS_LITERAL_STRING("%g").get(),
+                              MOZ_UTF16("%g"),
                               double(mNumbers[i]));
     // We ignore OOM, since it's not useful for us to return an error.
     aValue.Append(buf);
     if (i != last) {
       aValue.Append(' ');
     }
   }
 }
--- a/content/svg/content/src/SVGPathSegUtils.cpp
+++ b/content/svg/content/src/SVGPathSegUtils.cpp
@@ -31,51 +31,51 @@ SVGPathSegUtils::GetValueAsString(const 
   uint32_t type = DecodeType(aSeg[0]);
   PRUnichar typeAsChar = GetPathSegTypeAsLetter(type);
 
   // Special case arcs:
   if (IsArcType(type)) {
     bool largeArcFlag = aSeg[4] != 0.0f;
     bool sweepFlag = aSeg[5] != 0.0f;
     nsTextFormatter::ssprintf(aValue,
-                              NS_LITERAL_STRING("%c%g,%g %g %d,%d %g,%g").get(),
+                              MOZ_UTF16("%c%g,%g %g %d,%d %g,%g"),
                               typeAsChar, aSeg[1], aSeg[2], aSeg[3],
                               largeArcFlag, sweepFlag, aSeg[6], aSeg[7]);
   } else {
 
     switch (ArgCountForType(type)) {
     case 0:
       aValue = typeAsChar;
       break;
 
     case 1:
-      nsTextFormatter::ssprintf(aValue, NS_LITERAL_STRING("%c%g").get(),
+      nsTextFormatter::ssprintf(aValue, MOZ_UTF16("%c%g"),
                                 typeAsChar, aSeg[1]);
       break;
 
     case 2:
-      nsTextFormatter::ssprintf(aValue, NS_LITERAL_STRING("%c%g,%g").get(),
+      nsTextFormatter::ssprintf(aValue, MOZ_UTF16("%c%g,%g"),
                                 typeAsChar, aSeg[1], aSeg[2]);
       break;
 
     case 4:
-      nsTextFormatter::ssprintf(aValue, NS_LITERAL_STRING("%c%g,%g %g,%g").get(),
+      nsTextFormatter::ssprintf(aValue, MOZ_UTF16("%c%g,%g %g,%g"),
                                 typeAsChar, aSeg[1], aSeg[2], aSeg[3], aSeg[4]);
       break;
 
     case 6:
       nsTextFormatter::ssprintf(aValue,
-                                NS_LITERAL_STRING("%c%g,%g %g,%g %g,%g").get(),
+                                MOZ_UTF16("%c%g,%g %g,%g %g,%g"),
                                 typeAsChar, aSeg[1], aSeg[2], aSeg[3], aSeg[4],
                                 aSeg[5], aSeg[6]);
       break;
 
     default:
       NS_ABORT_IF_FALSE(false, "Unknown segment type");
-      aValue = NS_LITERAL_STRING("<unknown-segment-type>").get();
+      aValue = MOZ_UTF16("<unknown-segment-type>");
       return;
     }
   }
   
   // nsTextFormatter::ssprintf is one of the nsTextFormatter methods that
   // randomly appends '\0' to its output string, which means that the length
   // of the output string is one too long. We need to manually remove that '\0'
   // until nsTextFormatter is fixed.
--- a/content/svg/content/src/SVGPointList.cpp
+++ b/content/svg/content/src/SVGPointList.cpp
@@ -28,17 +28,17 @@ SVGPointList::GetValueAsString(nsAString
 {
   aValue.Truncate();
   PRUnichar buf[50];
   uint32_t last = mItems.Length() - 1;
   for (uint32_t i = 0; i < mItems.Length(); ++i) {
     // Would like to use aValue.AppendPrintf("%f,%f", item.mX, item.mY),
     // but it's not possible to always avoid trailing zeros.
     nsTextFormatter::snprintf(buf, ArrayLength(buf),
-                              NS_LITERAL_STRING("%g,%g").get(),
+                              MOZ_UTF16("%g,%g"),
                               double(mItems[i].mX), double(mItems[i].mY));
     // We ignore OOM, since it's not useful for us to return an error.
     aValue.Append(buf);
     if (i != last) {
       aValue.Append(' ');
     }
   }
 }
--- a/content/svg/content/src/nsSVGAngle.cpp
+++ b/content/svg/content/src/nsSVGAngle.cpp
@@ -79,17 +79,17 @@ GetUnitTypeForString(const nsAString& un
   return SVG_ANGLETYPE_UNKNOWN;
 }
 
 static void
 GetValueString(nsAString &aValueAsString, float aValue, uint16_t aUnitType)
 {
   PRUnichar buf[24];
   nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-                            NS_LITERAL_STRING("%g").get(),
+                            MOZ_UTF16("%g"),
                             (double)aValue);
   aValueAsString.Assign(buf);
 
   nsAutoString unitString;
   GetUnitString(unitString, aUnitType);
   aValueAsString.Append(unitString);
 }
 
--- a/content/svg/content/src/nsSVGLength2.cpp
+++ b/content/svg/content/src/nsSVGLength2.cpp
@@ -107,17 +107,17 @@ GetUnitTypeForString(const nsAString& un
   return nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN;
 }
 
 static void
 GetValueString(nsAString &aValueAsString, float aValue, uint16_t aUnitType)
 {
   PRUnichar buf[24];
   nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-                            NS_LITERAL_STRING("%g").get(),
+                            MOZ_UTF16("%g"),
                             (double)aValue);
   aValueAsString.Assign(buf);
 
   nsAutoString unitString;
   GetUnitString(unitString, aUnitType);
   aValueAsString.Append(unitString);
 }
 
--- a/content/svg/content/src/nsSVGTransform.cpp
+++ b/content/svg/content/src/nsSVGTransform.cpp
@@ -20,51 +20,51 @@ nsSVGTransform::GetValueAsString(nsAStri
 {
   PRUnichar buf[256];
 
   switch (mType) {
     case SVG_TRANSFORM_TRANSLATE:
       // The spec say that if Y is not provided, it is assumed to be zero.
       if (mMatrix.y0 != 0)
         nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-            NS_LITERAL_STRING("translate(%g, %g)").get(),
+            MOZ_UTF16("translate(%g, %g)"),
             mMatrix.x0, mMatrix.y0);
       else
         nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-            NS_LITERAL_STRING("translate(%g)").get(),
+            MOZ_UTF16("translate(%g)"),
             mMatrix.x0);
       break;
     case SVG_TRANSFORM_ROTATE:
       if (mOriginX != 0.0f || mOriginY != 0.0f)
         nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-            NS_LITERAL_STRING("rotate(%g, %g, %g)").get(),
+            MOZ_UTF16("rotate(%g, %g, %g)"),
             mAngle, mOriginX, mOriginY);
       else
         nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-            NS_LITERAL_STRING("rotate(%g)").get(), mAngle);
+            MOZ_UTF16("rotate(%g)"), mAngle);
       break;
     case SVG_TRANSFORM_SCALE:
       if (mMatrix.xx != mMatrix.yy)
         nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-            NS_LITERAL_STRING("scale(%g, %g)").get(), mMatrix.xx, mMatrix.yy);
+            MOZ_UTF16("scale(%g, %g)"), mMatrix.xx, mMatrix.yy);
       else
         nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-            NS_LITERAL_STRING("scale(%g)").get(), mMatrix.xx);
+            MOZ_UTF16("scale(%g)"), mMatrix.xx);
       break;
     case SVG_TRANSFORM_SKEWX:
       nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-                                NS_LITERAL_STRING("skewX(%g)").get(), mAngle);
+                                MOZ_UTF16("skewX(%g)"), mAngle);
       break;
     case SVG_TRANSFORM_SKEWY:
       nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-                                NS_LITERAL_STRING("skewY(%g)").get(), mAngle);
+                                MOZ_UTF16("skewY(%g)"), mAngle);
       break;
     case SVG_TRANSFORM_MATRIX:
       nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-          NS_LITERAL_STRING("matrix(%g, %g, %g, %g, %g, %g)").get(),
+          MOZ_UTF16("matrix(%g, %g, %g, %g, %g, %g)"),
                             mMatrix.xx, mMatrix.yx,
                             mMatrix.xy, mMatrix.yy,
                             mMatrix.x0, mMatrix.y0);
       break;
     default:
       buf[0] = '\0';
       NS_ERROR("unknown transformation type");
       break;
--- a/content/svg/content/src/nsSVGViewBox.cpp
+++ b/content/svg/content/src/nsSVGViewBox.cpp
@@ -177,17 +177,17 @@ void
 nsSVGViewBox::GetBaseValueString(nsAString& aValue) const
 {
   if (mBaseVal.none) {
     aValue.AssignLiteral("none");
     return;
   }
   PRUnichar buf[200];
   nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar),
-                            NS_LITERAL_STRING("%g %g %g %g").get(),
+                            MOZ_UTF16("%g %g %g %g"),
                             (double)mBaseVal.x, (double)mBaseVal.y,
                             (double)mBaseVal.width, (double)mBaseVal.height);
   aValue.Assign(buf);
 }
 
 
 already_AddRefed<dom::SVGAnimatedRect>
 nsSVGViewBox::ToSVGAnimatedRect(nsSVGElement* aSVGElement)
--- a/content/xml/document/src/nsXMLContentSink.cpp
+++ b/content/xml/document/src/nsXMLContentSink.cpp
@@ -1384,18 +1384,18 @@ nsXMLContentSink::ReportError(const PRUn
     mXSLTProcessor->CancelLoads();
     mXSLTProcessor = nullptr;
   }
 
   // release the nodes on stack
   mContentStack.Clear();
   mNotifyLevel = 0;
 
-  rv = HandleProcessingInstruction(NS_LITERAL_STRING("xml-stylesheet").get(),
-                                   NS_LITERAL_STRING("href=\"chrome://global/locale/intl.css\" type=\"text/css\"").get());
+  rv = HandleProcessingInstruction(MOZ_UTF16("xml-stylesheet"),
+                                   MOZ_UTF16("href=\"chrome://global/locale/intl.css\" type=\"text/css\""));
   NS_ENSURE_SUCCESS(rv, rv);
 
   const PRUnichar* noAtts[] = { 0, 0 };
 
   NS_NAMED_LITERAL_STRING(errorNs,
                           "http://www.mozilla.org/newlayout/xml/parsererror.xml");
 
   nsAutoString parsererror(errorNs);
--- a/content/xslt/src/xslt/txMozillaXSLTProcessor.cpp
+++ b/content/xslt/src/xslt/txMozillaXSLTProcessor.cpp
@@ -1062,22 +1062,22 @@ txMozillaXSLTProcessor::reportError(nsre
 
             nsXPIDLString errorMessage;
             nsCOMPtr<nsIStringBundle> bundle;
             sbs->CreateBundle(XSLT_MSGS_URL, getter_AddRefs(bundle));
 
             if (bundle) {
                 const PRUnichar* error[] = { errorText.get() };
                 if (mStylesheet) {
-                    bundle->FormatStringFromName(NS_LITERAL_STRING("TransformError").get(),
+                    bundle->FormatStringFromName(MOZ_UTF16("TransformError"),
                                                  error, 1,
                                                  getter_Copies(errorMessage));
                 }
                 else {
-                    bundle->FormatStringFromName(NS_LITERAL_STRING("LoadingError").get(),
+                    bundle->FormatStringFromName(MOZ_UTF16("LoadingError"),
                                                  error, 1,
                                                  getter_Copies(errorMessage));
                 }
             }
             mErrorText.Assign(errorMessage);
         }
     }
 
--- a/docshell/base/nsDSURIContentListener.cpp
+++ b/docshell/base/nsDSURIContentListener.cpp
@@ -431,17 +431,17 @@ bool nsDSURIContentListener::CheckFrameO
     while (tokenizer.hasMoreTokens()) {
         const nsSubstring& tok = tokenizer.nextToken();
         if (!CheckOneFrameOptionsPolicy(httpChannel, tok)) {
             // cancel the load and display about:blank
             httpChannel->Cancel(NS_BINDING_ABORTED);
             if (mDocShell) {
                 nsCOMPtr<nsIWebNavigation> webNav(do_QueryObject(mDocShell));
                 if (webNav) {
-                    webNav->LoadURI(NS_LITERAL_STRING("about:blank").get(),
+                    webNav->LoadURI(MOZ_UTF16("about:blank"),
                                     0, nullptr, nullptr, nullptr);
                 }
             }
             return false;
         }
     }
 
     return true;
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -11698,35 +11698,35 @@ nsDocShell::ConfirmRepost(bool * aRepost
   nsCOMPtr<nsIStringBundle> brandBundle;
   rv = stringBundleService->CreateBundle(kBrandBundleURL, getter_AddRefs(brandBundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   NS_ASSERTION(prompter && brandBundle && appBundle,
                "Unable to set up repost prompter.");
 
   nsXPIDLString brandName;
-  rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+  rv = brandBundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                       getter_Copies(brandName));
 
   nsXPIDLString msgString, button0Title;
   if (NS_FAILED(rv)) { // No brand, use the generic version.
-    rv = appBundle->GetStringFromName(NS_LITERAL_STRING("confirmRepostPrompt").get(),
+    rv = appBundle->GetStringFromName(MOZ_UTF16("confirmRepostPrompt"),
                                       getter_Copies(msgString));
   }
   else {
     // Brand available - if the app has an override file with formatting, the app name will
     // be included. Without an override, the prompt will look like the generic version.
     const PRUnichar *formatStrings[] = { brandName.get() };
-    rv = appBundle->FormatStringFromName(NS_LITERAL_STRING("confirmRepostPrompt").get(),
+    rv = appBundle->FormatStringFromName(MOZ_UTF16("confirmRepostPrompt"),
                                          formatStrings, ArrayLength(formatStrings),
                                          getter_Copies(msgString));
   }
   if (NS_FAILED(rv)) return rv;
 
-  rv = appBundle->GetStringFromName(NS_LITERAL_STRING("resendButton.label").get(),
+  rv = appBundle->GetStringFromName(MOZ_UTF16("resendButton.label"),
                                     getter_Copies(button0Title));
   if (NS_FAILED(rv)) return rv;
 
   int32_t buttonPressed;
   // The actual value here is irrelevant, but we can't pass an invalid
   // bool through XPConnect.
   bool checkState = false;
   rv = prompter->
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -8894,17 +8894,17 @@ nsGlobalWindow::Find(const nsAString& aS
   if (aString.IsEmpty() || aShowDialog) {
     // See if the find dialog is already up using nsIWindowMediator
     nsCOMPtr<nsIWindowMediator> windowMediator =
       do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
 
     nsCOMPtr<nsIDOMWindow> findDialog;
 
     if (windowMediator) {
-      windowMediator->GetMostRecentWindow(NS_LITERAL_STRING("findInPage").get(),
+      windowMediator->GetMostRecentWindow(MOZ_UTF16("findInPage"),
                                           getter_AddRefs(findDialog));
     }
 
     if (findDialog) {
       // The Find dialog is already open, bring it to the top.
       aError = findDialog->Focus();
     } else if (finder) {
       // Open a Find dialog
--- a/dom/camera/GonkCameraControl.cpp
+++ b/dom/camera/GonkCameraControl.cpp
@@ -1153,17 +1153,17 @@ public:
 
   ~RecordingComplete() { }
 
   NS_IMETHOD Run()
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-    obs->NotifyObservers(mFile, "file-watcher-notify", NS_LITERAL_STRING("modified").get());
+    obs->NotifyObservers(mFile, "file-watcher-notify", MOZ_UTF16("modified"));
     return NS_OK;
   }
 
 private:
   nsRefPtr<DeviceStorageFile> mFile;
 };
 
 nsresult
--- a/dom/plugins/ipc/PluginHangUIParent.cpp
+++ b/dom/plugins/ipc/PluginHangUIParent.cpp
@@ -377,17 +377,17 @@ PluginHangUIParent::GetHangUIOwnerWindow
   windowHandle = nullptr;
 
   nsresult rv;
   nsCOMPtr<nsIWindowMediator> winMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID,
                                                         &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMWindow> navWin;
-  rv = winMediator->GetMostRecentWindow(NS_LITERAL_STRING("navigator:browser").get(),
+  rv = winMediator->GetMostRecentWindow(MOZ_UTF16("navigator:browser"),
                                         getter_AddRefs(navWin));
   NS_ENSURE_SUCCESS(rv, rv);
   if (!navWin) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIWidget> widget = WidgetUtils::DOMWindowToWidget(navWin);
   if (!widget) {
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -866,17 +866,17 @@ nsGeolocationService::StartDevice(nsIPri
       NS_FAILED(rv = mProvider->Watch(this))) {
 
     NotifyError(nsIDOMGeoPositionError::POSITION_UNAVAILABLE);
     return rv;
   }
 
   obs->NotifyObservers(mProvider,
                        "geolocation-device-events",
-                       NS_LITERAL_STRING("starting").get());
+                       MOZ_UTF16("starting"));
 
   return NS_OK;
 }
 
 void
 nsGeolocationService::SetDisconnectTimer()
 {
   if (!mDisconnectTimer) {
@@ -946,17 +946,17 @@ nsGeolocationService::StopDevice()
     return;
   }
 
   mHigherAccuracy = false;
 
   mProvider->Shutdown();
   obs->NotifyObservers(mProvider,
                        "geolocation-device-events",
-                       NS_LITERAL_STRING("shutdown").get());
+                       MOZ_UTF16("shutdown"));
 }
 
 StaticRefPtr<nsGeolocationService> nsGeolocationService::sService;
 
 already_AddRefed<nsGeolocationService>
 nsGeolocationService::GetGeolocationService()
 {
   nsRefPtr<nsGeolocationService> result;
--- a/dom/system/gonk/AudioManager.cpp
+++ b/dom/system/gonk/AudioManager.cpp
@@ -43,20 +43,20 @@
 using namespace mozilla::dom::gonk;
 using namespace android;
 using namespace mozilla::hal;
 using namespace mozilla;
 using namespace mozilla::dom::bluetooth;
 
 #define LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "AudioManager" , ## args)
 
-#define HEADPHONES_STATUS_HEADSET   NS_LITERAL_STRING("headset").get()
-#define HEADPHONES_STATUS_HEADPHONE NS_LITERAL_STRING("headphone").get()
-#define HEADPHONES_STATUS_OFF       NS_LITERAL_STRING("off").get()
-#define HEADPHONES_STATUS_UNKNOWN   NS_LITERAL_STRING("unknown").get()
+#define HEADPHONES_STATUS_HEADSET   MOZ_UTF16("headset")
+#define HEADPHONES_STATUS_HEADPHONE MOZ_UTF16("headphone")
+#define HEADPHONES_STATUS_OFF       MOZ_UTF16("off")
+#define HEADPHONES_STATUS_UNKNOWN   MOZ_UTF16("unknown")
 #define HEADPHONES_STATUS_CHANGED   "headphones-status-changed"
 #define MOZ_SETTINGS_CHANGE_ID      "mozsettings-changed"
 
 static void BinderDeadCallback(status_t aErr);
 static void InternalSetAudioRoutes(SwitchState aState);
 // Refer AudioService.java from Android
 static int sMaxStreamVolumeTbl[AUDIO_STREAM_CNT] = {
   5,   // voice call
--- a/editor/composer/src/nsEditingSession.cpp
+++ b/editor/composer/src/nsEditingSession.cpp
@@ -1017,17 +1017,17 @@ nsEditingSession::EndDocumentLoad(nsIWeb
 void
 nsEditingSession::TimerCallback(nsITimer* aTimer, void* aClosure)
 {
   nsCOMPtr<nsIDocShell> docShell = do_QueryReferent(static_cast<nsIWeakReference*> (aClosure));
   if (docShell)
   {
     nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
     if (webNav)
-      webNav->LoadURI(NS_LITERAL_STRING("about:blank").get(),
+      webNav->LoadURI(MOZ_UTF16("about:blank"),
                       0, nullptr, nullptr, nullptr);
   }
 }
 
 /*---------------------------------------------------------------------------
 
   StartPageLoad
 
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -1207,22 +1207,22 @@ nsHTMLEditor::ReplaceHeadContentsWithHTM
   NS_ENSURE_TRUE(headNode, NS_ERROR_NULL_POINTER);
 
   // First, make sure there are no return chars in the source.
   // Bad things happen if you insert returns (instead of dom newlines, \n)
   // into an editor document.
   nsAutoString inputString (aSourceToInsert);  // hope this does copy-on-write
  
   // Windows linebreaks: Map CRLF to LF:
-  inputString.ReplaceSubstring(NS_LITERAL_STRING("\r\n").get(),
-                               NS_LITERAL_STRING("\n").get());
+  inputString.ReplaceSubstring(MOZ_UTF16("\r\n"),
+                               MOZ_UTF16("\n"));
  
   // Mac linebreaks: Map any remaining CR to LF:
-  inputString.ReplaceSubstring(NS_LITERAL_STRING("\r").get(),
-                               NS_LITERAL_STRING("\n").get());
+  inputString.ReplaceSubstring(MOZ_UTF16("\r"),
+                               MOZ_UTF16("\n"));
 
   nsAutoEditBatch beginBatching(this);
 
   res = GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   // Get the first range in the selection, for context:
--- a/embedding/components/commandhandler/src/nsCommandManager.cpp
+++ b/embedding/components/commandhandler/src/nsCommandManager.cpp
@@ -98,17 +98,17 @@ nsCommandManager::CommandStatusChanged(c
     // XXX Should we worry about observers removing themselves from Observe()?
     int32_t i, numItems = commandObservers->Length();
     for (i = 0; i < numItems;  ++i)
     {
       nsCOMPtr<nsIObserver> observer = commandObservers->ElementAt(i);
       // should we get the command state to pass here? This might be expensive.
       observer->Observe(NS_ISUPPORTS_CAST(nsICommandManager*, this),
                         aCommandName,
-                        NS_LITERAL_STRING("command_status_changed").get());
+                        MOZ_UTF16("command_status_changed"));
     }
   }
 
   return NS_OK;
 }
 
 #if 0
 #pragma mark -
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -762,17 +762,17 @@ nsPermissionManager::AddInternal(nsIPrin
       if (aNotifyOperation == eNotify) {
         NotifyObserversWithPermission(host,
                                       entry->GetKey()->mAppId,
                                       entry->GetKey()->mIsInBrowserElement,
                                       mTypeArray[typeIndex],
                                       aPermission,
                                       aExpireType,
                                       aExpireTime,
-                                      NS_LITERAL_STRING("added").get());
+                                      MOZ_UTF16("added"));
       }
 
       break;
     }
 
   case eOperationRemoving:
     {
       PermissionEntry oldPermissionEntry = entry->GetPermissions()[index];
@@ -788,17 +788,17 @@ nsPermissionManager::AddInternal(nsIPrin
       if (aNotifyOperation == eNotify) {
         NotifyObserversWithPermission(host,
                                       entry->GetKey()->mAppId,
                                       entry->GetKey()->mIsInBrowserElement,
                                       mTypeArray[typeIndex],
                                       oldPermissionEntry.mPermission,
                                       oldPermissionEntry.mExpireType,
                                       oldPermissionEntry.mExpireTime,
-                                      NS_LITERAL_STRING("deleted").get());
+                                      MOZ_UTF16("deleted"));
       }
 
       // If there are no more permissions stored for that entry, clear it.
       if (entry->GetPermissions().IsEmpty()) {
         mPermissionTable.RawRemoveEntry(entry);
       }
 
       break;
@@ -835,17 +835,17 @@ nsPermissionManager::AddInternal(nsIPrin
       if (aNotifyOperation == eNotify) {
         NotifyObserversWithPermission(host,
                                       entry->GetKey()->mAppId,
                                       entry->GetKey()->mIsInBrowserElement,
                                       mTypeArray[typeIndex],
                                       aPermission,
                                       aExpireType,
                                       aExpireTime,
-                                      NS_LITERAL_STRING("changed").get());
+                                      MOZ_UTF16("changed"));
       }
 
       break;
     }
   }
 
   return NS_OK;
 }
@@ -911,17 +911,17 @@ nsPermissionManager::CloseDB(bool aRebui
 nsresult
 nsPermissionManager::RemoveAllInternal(bool aNotifyObservers)
 {
   // Remove from memory and notify immediately. Since the in-memory
   // database is authoritative, we do not need confirmation from the
   // on-disk database to notify observers.
   RemoveAllFromMemory();
   if (aNotifyObservers) {
-    NotifyObservers(nullptr, NS_LITERAL_STRING("cleared").get());
+    NotifyObservers(nullptr, MOZ_UTF16("cleared"));
   }
 
   // clear the db
   if (mDBConn) {
     nsCOMPtr<mozIStorageAsyncStatement> removeStmt;
     nsresult rv = mDBConn->
       CreateAsyncStatement(NS_LITERAL_CSTRING(
          "DELETE FROM moz_hosts"
@@ -1251,17 +1251,17 @@ NS_IMETHODIMP nsPermissionManager::GetEn
 NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData)
 {
   ENSURE_NOT_CHILD_PROCESS;
 
   if (!nsCRT::strcmp(aTopic, "profile-before-change")) {
     // The profile is about to change,
     // or is going away because the application is shutting down.
     mIsShuttingDown = true;
-    if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) {
+    if (!nsCRT::strcmp(someData, MOZ_UTF16("shutdown-cleanse"))) {
       // Clear the permissions file and close the db asynchronously
       RemoveAllInternal(false);
     } else {
       RemoveAllFromMemory();
       CloseDB(false);
     }
   }
   else if (!nsCRT::strcmp(aTopic, "profile-do-change")) {
@@ -1382,33 +1382,33 @@ nsPermissionManager::RemoveExpiredPermis
 
       gPermissionManager->NotifyObserversWithPermission(entry->GetKey()->mHost,
                                                         entry->GetKey()->mAppId,
                                                         entry->GetKey()->mIsInBrowserElement,
                                                         gPermissionManager->mTypeArray.ElementAt(oldPermissionEntry.mType),
                                                         oldPermissionEntry.mPermission,
                                                         oldPermissionEntry.mExpireType,
                                                         oldPermissionEntry.mExpireTime,
-                                                        NS_LITERAL_STRING("deleted").get());
+                                                        MOZ_UTF16("deleted"));
       --i;
       continue;
     }
 
     permEntry.mPermission = permEntry.mNonSessionPermission;
     permEntry.mExpireType = permEntry.mNonSessionExpireType;
     permEntry.mExpireTime = permEntry.mNonSessionExpireTime;
 
     gPermissionManager->NotifyObserversWithPermission(entry->GetKey()->mHost,
                                                       entry->GetKey()->mAppId,
                                                       entry->GetKey()->mIsInBrowserElement,
                                                       gPermissionManager->mTypeArray.ElementAt(permEntry.mType),
                                                       permEntry.mPermission,
                                                       permEntry.mExpireType,
                                                       permEntry.mExpireTime,
-                                                      NS_LITERAL_STRING("changed").get());
+                                                      MOZ_UTF16("changed"));
   }
 
   return PL_DHASH_NEXT;
 }
 
 nsresult
 nsPermissionManager::RemoveExpiredPermissionsForApp(uint32_t aAppId)
 {
--- a/extensions/gio/nsGIOProtocolHandler.cpp
+++ b/extensions/gio/nsGIOProtocolHandler.cpp
@@ -822,27 +822,27 @@ mount_operation_ask_password (GMountOper
     return;
   }
   nsAutoString nsmessage;
 
   if (flags & G_ASK_PASSWORD_NEED_PASSWORD) {
     if (flags & G_ASK_PASSWORD_NEED_USERNAME) {
       if (!realm.IsEmpty()) {
         const PRUnichar *strings[] = { realm.get(), dispHost.get() };
-        bundle->FormatStringFromName(NS_LITERAL_STRING("EnterLoginForRealm").get(),
+        bundle->FormatStringFromName(MOZ_UTF16("EnterLoginForRealm"),
                                      strings, 2, getter_Copies(nsmessage));
       } else {
         const PRUnichar *strings[] = { dispHost.get() };
-        bundle->FormatStringFromName(NS_LITERAL_STRING("EnterUserPasswordFor").get(),
+        bundle->FormatStringFromName(MOZ_UTF16("EnterUserPasswordFor"),
                                      strings, 1, getter_Copies(nsmessage));
       }
     } else {
       NS_ConvertUTF8toUTF16 userName(default_user);
       const PRUnichar *strings[] = { userName.get(), dispHost.get() };
-      bundle->FormatStringFromName(NS_LITERAL_STRING("EnterPasswordFor").get(),
+      bundle->FormatStringFromName(MOZ_UTF16("EnterPasswordFor"),
                                    strings, 2, getter_Copies(nsmessage));
     }
   } else {
     g_warning("Unknown mount operation request (flags: %x)", flags);
   }
 
   if (nsmessage.IsEmpty()) {
     g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
--- a/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
+++ b/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
@@ -217,23 +217,23 @@ ProxiedAuthCallback(gconstpointer in,
                           getter_AddRefs(bundle));
   if (!bundle)
     return;
 
   nsString message;
   if (!realm.IsEmpty())
   {
     const PRUnichar *strings[] = { realm.get(), dispHost.get() };
-    bundle->FormatStringFromName(NS_LITERAL_STRING("EnterUserPasswordForRealm").get(),
+    bundle->FormatStringFromName(MOZ_UTF16("EnterUserPasswordForRealm"),
                                  strings, 2, getter_Copies(message));
   }
   else
   {
     const PRUnichar *strings[] = { dispHost.get() };
-    bundle->FormatStringFromName(NS_LITERAL_STRING("EnterUserPasswordFor").get(),
+    bundle->FormatStringFromName(MOZ_UTF16("EnterUserPasswordFor"),
                                  strings, 1, getter_Copies(message));
   }
   if (message.IsEmpty())
     return;
 
   // Prompt the user...
   nsresult rv;
   bool retval = false;
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -497,21 +497,21 @@ nsresult nsAutoConfig::PromptForEMailAdd
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://autoconfig/locale/autoconfig.properties",
                                 getter_AddRefs(bundle));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsXPIDLString title;
-    rv = bundle->GetStringFromName(NS_LITERAL_STRING("emailPromptTitle").get(), getter_Copies(title));
+    rv = bundle->GetStringFromName(MOZ_UTF16("emailPromptTitle"), getter_Copies(title));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsXPIDLString err;
-    rv = bundle->GetStringFromName(NS_LITERAL_STRING("emailPromptMsg").get(), getter_Copies(err));
+    rv = bundle->GetStringFromName(MOZ_UTF16("emailPromptMsg"), getter_Copies(err));
     NS_ENSURE_SUCCESS(rv, rv);
     bool check = false;
     nsXPIDLString emailResult;
     bool success;
     rv = promptService->Prompt(nullptr, title.get(), err.get(), getter_Copies(emailResult), nullptr, &check, &success);
     if (!success)
       return NS_ERROR_FAILURE;
     NS_ENSURE_SUCCESS(rv, rv);
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -54,22 +54,22 @@ static void DisplayError(void)
 
     nsCOMPtr<nsIStringBundle> bundle;
     bundleService->CreateBundle("chrome://autoconfig/locale/autoconfig.properties",
                                 getter_AddRefs(bundle));
     if (!bundle)
         return;
 
     nsXPIDLString title;
-    rv = bundle->GetStringFromName(NS_LITERAL_STRING("readConfigTitle").get(), getter_Copies(title));
+    rv = bundle->GetStringFromName(MOZ_UTF16("readConfigTitle"), getter_Copies(title));
     if (NS_FAILED(rv))
         return;
 
     nsXPIDLString err;
-    rv = bundle->GetStringFromName(NS_LITERAL_STRING("readConfigMsg").get(), getter_Copies(err));
+    rv = bundle->GetStringFromName(MOZ_UTF16("readConfigMsg"), getter_Copies(err));
     if (NS_FAILED(rv))
         return;
 
     promptService->Alert(nullptr, title.get(), err.get());
 }
 
 // nsISupports Implementation
 
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -138,17 +138,17 @@ public:
 NS_IMPL_ISUPPORTS2(SRGBOverrideObserver, nsIObserver, nsISupportsWeakReference)
 
 NS_IMETHODIMP
 SRGBOverrideObserver::Observe(nsISupports *aSubject,
                               const char *aTopic,
                               const PRUnichar *someData)
 {
     NS_ASSERTION(NS_strcmp(someData,
-                   NS_LITERAL_STRING("gfx.color_mangement.force_srgb").get()),
+                   MOZ_UTF16("gfx.color_mangement.force_srgb")),
                  "Restarting CMS on wrong pref!");
     ShutdownCMS();
     return NS_OK;
 }
 
 #define GFX_DOWNLOADABLE_FONTS_ENABLED "gfx.downloadable_fonts.enabled"
 
 #define GFX_PREF_HARFBUZZ_SCRIPTS "gfx.font_rendering.harfbuzz.scripts"
--- a/image/decoders/icon/gtk/nsIconChannel.cpp
+++ b/image/decoders/icon/gtk/nsIconChannel.cpp
@@ -315,17 +315,17 @@ nsIconChannel::InitWithGnome(nsIMozIconU
     NS_ASSERTION(bundleService, "String bundle service must be present!");
 
     nsCOMPtr<nsIStringBundle> bundle;
     bundleService->CreateBundle("chrome://branding/locale/brand.properties",
                                 getter_AddRefs(bundle));
     nsAutoString appName;
 
     if (bundle) {
-      bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+      bundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                 getter_Copies(appName));
     } else {
       NS_WARNING("brand.properties not present, using default application name");
       appName.Assign(NS_LITERAL_STRING("Gecko"));
     }
 
     char* empty[] = { "" };
     _gnome_init(NS_ConvertUTF16toUTF8(appName).get(),
--- a/intl/uconv/src/nsCharsetConverterManager.cpp
+++ b/intl/uconv/src/nsCharsetConverterManager.cpp
@@ -106,17 +106,17 @@ nsresult GetCharsetDataImpl(const char *
 }
 
 //static
 bool nsCharsetConverterManager::IsInternal(const nsACString& aCharset)
 {
   nsAutoString str;
   // fully qualify to possibly avoid vtable call
   nsresult rv = GetCharsetDataImpl(PromiseFlatCString(aCharset).get(),
-                                   NS_LITERAL_STRING(".isInternal").get(),
+                                   MOZ_UTF16(".isInternal"),
                                    str);
 
   return NS_SUCCEEDED(rv);
 }
 
 
 //----------------------------------------------------------------------------//----------------------------------------------------------------------------
 // Interface nsICharsetConverterManager [implementation]
@@ -340,17 +340,17 @@ NS_IMETHODIMP
 nsCharsetConverterManager::GetCharsetLangGroupRaw(const char * aCharset, 
                                                   nsIAtom** aResult)
 {
 
   *aResult = nullptr;
   nsAutoString langGroup;
   // fully qualify to possibly avoid vtable call
   nsresult rv = nsCharsetConverterManager::GetCharsetData(
-      aCharset, NS_LITERAL_STRING(".LangGroup").get(), langGroup);
+      aCharset, MOZ_UTF16(".LangGroup"), langGroup);
 
   if (NS_SUCCEEDED(rv)) {
     ToLowerCase(langGroup); // use lowercase for all language atoms
     *aResult = NS_NewAtom(langGroup).get();
   }
 
   return rv;
 }
--- a/intl/unicharutil/src/nsEntityConverter.cpp
+++ b/intl/unicharutil/src/nsEntityConverter.cpp
@@ -38,17 +38,17 @@ nsEntityConverter::LoadVersionPropertyFi
     nsCOMPtr<nsIStringBundle> entities;
     nsresult rv = bundleService->CreateBundle(url.get(), getter_AddRefs(entities));
     if (NS_FAILED(rv)) return rv;
     
     nsresult result;
 
     nsAutoString key;
     nsXPIDLString value;
-    rv = entities->GetStringFromName(NS_LITERAL_STRING("length").get(),
+    rv = entities->GetStringFromName(MOZ_UTF16("length"),
                                      getter_Copies(value));
     NS_ASSERTION(NS_SUCCEEDED(rv),"nsEntityConverter: malformed entity table\n");
     if (NS_FAILED(rv)) return rv;
       
     mVersionListLength = nsAutoString(value).ToInteger(&result);
     NS_ASSERTION(32 >= mVersionListLength,"nsEntityConverter: malformed entity table\n");
     if (32 < mVersionListLength) return NS_ERROR_FAILURE;
     
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -2746,18 +2746,18 @@ static int32_t FindChar(const nsTextFrag
 
 static bool IsChineseOrJapanese(nsIFrame* aFrame)
 {
   nsIAtom* language = aFrame->StyleFont()->mLanguage;
   if (!language) {
     return false;
   }
   const PRUnichar *lang = language->GetUTF16String();
-  return (!nsCRT::strncmp(lang, NS_LITERAL_STRING("ja").get(), 2) ||
-          !nsCRT::strncmp(lang, NS_LITERAL_STRING("zh").get(), 2)) &&
+  return (!nsCRT::strncmp(lang, MOZ_UTF16("ja"), 2) ||
+          !nsCRT::strncmp(lang, MOZ_UTF16("zh"), 2)) &&
          (language->GetLength() == 2 || lang[2] == '-');
 }
 
 #ifdef DEBUG
 static bool IsInBounds(const gfxSkipCharsIterator& aStart, int32_t aContentLength,
                          uint32_t aOffset, uint32_t aLength) {
   if (aStart.GetSkippedOffset() > aOffset)
     return false;
--- a/layout/printing/nsPrintData.cpp
+++ b/layout/printing/nsPrintData.cpp
@@ -51,17 +51,17 @@ nsPrintData::nsPrintData(ePrintDataType 
 {
   MOZ_COUNT_CTOR(nsPrintData);
   nsCOMPtr<nsIStringBundle> brandBundle;
   nsCOMPtr<nsIStringBundleService> svc =
     mozilla::services::GetStringBundleService();
   if (svc) {
     svc->CreateBundle( "chrome://branding/locale/brand.properties", getter_AddRefs( brandBundle ) );
     if (brandBundle) {
-      brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), &mBrandName );
+      brandBundle->GetStringFromName(MOZ_UTF16("brandShortName"), &mBrandName );
     }
   }
 
   if (!mBrandName) {
     mBrandName = ToNewUnicode(NS_LITERAL_STRING("Mozilla Document"));
   }
 
 }
--- a/layout/style/ErrorReporter.cpp
+++ b/layout/style/ErrorReporter.cpp
@@ -322,34 +322,34 @@ ErrorReporter::ReportUnexpectedEOF(const
   if (!ShouldReportErrors()) return;
 
   nsAutoString innerStr;
   sStringBundle->GetStringFromName(NS_ConvertASCIItoUTF16(aMessage).get(),
                                    getter_Copies(innerStr));
   const PRUnichar *params[1] = { innerStr.get() };
 
   nsAutoString str;
-  sStringBundle->FormatStringFromName(NS_LITERAL_STRING("PEUnexpEOF2").get(),
+  sStringBundle->FormatStringFromName(MOZ_UTF16("PEUnexpEOF2"),
                                       params, ArrayLength(params),
                                       getter_Copies(str));
   AddToError(str);
 }
 
 void
 ErrorReporter::ReportUnexpectedEOF(PRUnichar aExpected)
 {
   if (!ShouldReportErrors()) return;
 
   const PRUnichar expectedStr[] = {
     PRUnichar('\''), aExpected, PRUnichar('\''), PRUnichar(0)
   };
   const PRUnichar *params[1] = { expectedStr };
 
   nsAutoString str;
-  sStringBundle->FormatStringFromName(NS_LITERAL_STRING("PEUnexpEOF2").get(),
+  sStringBundle->FormatStringFromName(MOZ_UTF16("PEUnexpEOF2"),
                                       params, ArrayLength(params),
                                       getter_Copies(str));
   AddToError(str);
 }
 
 } // namespace css
 } // namespace mozilla
 
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -358,34 +358,34 @@ nsTreeBodyFrame::EnsureView()
     }
     nsCOMPtr<nsIBoxObject> box = do_QueryInterface(mTreeBoxObject);
     if (box) {
       nsWeakFrame weakFrame(this);
       nsCOMPtr<nsITreeView> treeView;
       mTreeBoxObject->GetView(getter_AddRefs(treeView));
       if (treeView && weakFrame.IsAlive()) {
         nsXPIDLString rowStr;
-        box->GetProperty(NS_LITERAL_STRING("topRow").get(),
+        box->GetProperty(MOZ_UTF16("topRow"),
                          getter_Copies(rowStr));
         nsAutoString rowStr2(rowStr);
         nsresult error;
         int32_t rowIndex = rowStr2.ToInteger(&error);
 
         // Set our view.
         SetView(treeView);
         ENSURE_TRUE(weakFrame.IsAlive());
 
         // Scroll to the given row.
         // XXX is this optimal if we haven't laid out yet?
         ScrollToRow(rowIndex);
         ENSURE_TRUE(weakFrame.IsAlive());
 
         // Clear out the property info for the top row, but we always keep the
         // view current.
-        box->RemoveProperty(NS_LITERAL_STRING("topRow").get());
+        box->RemoveProperty(MOZ_UTF16("topRow"));
       }
     }
   }
 }
 
 void
 nsTreeBodyFrame::ManageReflowCallback(const nsRect& aRect, nscoord aHorzWidth)
 {
--- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp
@@ -545,17 +545,17 @@ Preferences::Observe(nsISupports *aSubje
                      const PRUnichar *someData)
 {
   if (XRE_GetProcessType() == GeckoProcessType_Content)
     return NS_ERROR_NOT_AVAILABLE;
 
   nsresult rv = NS_OK;
 
   if (!nsCRT::strcmp(aTopic, "profile-before-change")) {
-    if (!nsCRT::strcmp(someData, NS_LITERAL_STRING("shutdown-cleanse").get())) {
+    if (!nsCRT::strcmp(someData, MOZ_UTF16("shutdown-cleanse"))) {
       if (mCurrentFile) {
         mCurrentFile->Remove(false);
         mCurrentFile = nullptr;
       }
     } else {
       rv = SavePrefFile(nullptr);
     }
   } else if (!strcmp(aTopic, "load-extension-defaults")) {
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -678,18 +678,18 @@ nsIOService::SetOffline(bool offline)
         mozilla::services::GetObserverService();
 
     NS_ASSERTION(observerService, "The observer service should not be null");
 
     if (XRE_GetProcessType() == GeckoProcessType_Default) {
         if (observerService) {
             (void)observerService->NotifyObservers(nullptr,
                 NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC, offline ? 
-                NS_LITERAL_STRING("true").get() :
-                NS_LITERAL_STRING("false").get());
+                MOZ_UTF16("true") :
+                MOZ_UTF16("false"));
         }
     }
 
     nsIIOService *subject = static_cast<nsIIOService *>(this);
     while (mSetOfflineValue != mOffline) {
         offline = mSetOfflineValue;
 
         if (offline && !mOffline) {
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -1558,17 +1558,17 @@ nsCookieService::Observe(nsISupports    
                          const char      *aTopic,
                          const PRUnichar *aData)
 {
   // check the topic
   if (!strcmp(aTopic, "profile-before-change")) {
     // The profile is about to change,
     // or is going away because the application is shutting down.
     if (mDBState && mDBState->dbConn &&
-        !nsCRT::strcmp(aData, NS_LITERAL_STRING("shutdown-cleanse").get())) {
+        !nsCRT::strcmp(aData, MOZ_UTF16("shutdown-cleanse"))) {
       // Clear the cookie db if we're in the default DBState.
       RemoveAll();
     }
 
     // Close the default DB connection and null out our DBStates before
     // changing.
     CloseDBStates();
 
@@ -1651,17 +1651,17 @@ nsCookieService::SetCookieString(nsIURI 
   // The aPrompt argument is deprecated and unused.  Avoid introducing new
   // code that uses this argument by warning if the value is non-null.
   MOZ_ASSERT(!aPrompt);
   if (aPrompt) {
     nsCOMPtr<nsIConsoleService> aConsoleService =
         do_GetService("@mozilla.org/consoleservice;1");
     if (aConsoleService) {
       aConsoleService->LogStringMessage(
-        NS_LITERAL_STRING("Non-null prompt ignored by nsCookieService.").get());
+        MOZ_UTF16("Non-null prompt ignored by nsCookieService."));
     }
   }
   return SetCookieStringCommon(aHostURI, aCookieHeader, nullptr, aChannel,
                                false);
 }
 
 NS_IMETHODIMP
 nsCookieService::SetCookieStringFromHttp(nsIURI     *aHostURI,
@@ -1674,17 +1674,17 @@ nsCookieService::SetCookieStringFromHttp
   // The aPrompt argument is deprecated and unused.  Avoid introducing new
   // code that uses this argument by warning if the value is non-null.
   MOZ_ASSERT(!aPrompt);
   if (aPrompt) {
     nsCOMPtr<nsIConsoleService> aConsoleService =
         do_GetService("@mozilla.org/consoleservice;1");
     if (aConsoleService) {
       aConsoleService->LogStringMessage(
-        NS_LITERAL_STRING("Non-null prompt ignored by nsCookieService.").get());
+        MOZ_UTF16("Non-null prompt ignored by nsCookieService."));
     }
   }
   return SetCookieStringCommon(aHostURI, aCookieHeader, aServerTime, aChannel,
                                true);
 }
 
 nsresult
 nsCookieService::SetCookieStringCommon(nsIURI *aHostURI,
@@ -1860,17 +1860,17 @@ nsCookieService::NotifyThirdParty(nsIURI
                                       topic,
                                       referringHostUTF16.get());
     return;
   } while (0);
 
   // This can fail for a number of reasons, in which kind we fallback to "?"
   mObserverService->NotifyObservers(aHostURI,
                                     topic,
-                                    NS_LITERAL_STRING("?").get());
+                                    MOZ_UTF16("?"));
 }
 
 // notify observers that the cookie list changed. there are five possible
 // values for aData:
 // "deleted" means a cookie was deleted. aSubject is the deleted cookie.
 // "added"   means a cookie was added. aSubject is the added cookie.
 // "changed" means a cookie was altered. aSubject is the new cookie.
 // "cleared" means the entire cookie list was cleared. aSubject is null.
@@ -1959,17 +1959,17 @@ nsCookieService::RemoveAll()
     } else {
       // Recreate the database.
       COOKIE_LOGSTRING(PR_LOG_DEBUG,
         ("RemoveAll(): corruption detected with rv 0x%x", rv));
       HandleCorruptDB(mDefaultDBState);
     }
   }
 
-  NotifyChanged(nullptr, NS_LITERAL_STRING("cleared").get());
+  NotifyChanged(nullptr, MOZ_UTF16("cleared"));
   return NS_OK;
 }
 
 static PLDHashOperator
 COMArrayCallback(nsCookieEntry *aEntry,
                  void          *aArg)
 {
   nsCOMArray<nsICookie> *data = static_cast<nsCOMArray<nsICookie> *>(aArg);
@@ -2085,17 +2085,17 @@ nsCookieService::Remove(const nsACString
     NS_NewURI(getter_AddRefs(uri), host);
 
     if (uri)
       mPermissionService->SetAccess(uri, nsICookiePermission::ACCESS_DENY);
   }
 
   if (cookie) {
     // Everything's done. Notify observers.
-    NotifyChanged(cookie, NS_LITERAL_STRING("deleted").get());
+    NotifyChanged(cookie, MOZ_UTF16("deleted"));
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCookieService::Remove(const nsACString &aHost,
                         const nsACString &aName,
@@ -3019,17 +3019,17 @@ nsCookieService::AddInternal(const nsCoo
       // Remove the old cookie.
       RemoveCookieFromList(matchIter);
 
       // If the new cookie has expired -- i.e. the intent was simply to delete
       // the old cookie -- then we're done.
       if (aCookie->Expiry() <= currentTime) {
         COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader,
           "previously stored cookie was deleted");
-        NotifyChanged(oldCookie, NS_LITERAL_STRING("deleted").get());
+        NotifyChanged(oldCookie, MOZ_UTF16("deleted"));
         return;
       }
 
       // Preserve creation time of cookie for ordering purposes.
       aCookie->SetCreationTime(oldCookie->CreationTime());
     }
 
   } else {
@@ -3070,21 +3070,21 @@ nsCookieService::AddInternal(const nsCoo
   // Add the cookie to the db. We do not supply a params array for batching
   // because this might result in removals and additions being out of order.
   AddCookieToList(aKey, aCookie, mDBState, nullptr);
   COOKIE_LOGSUCCESS(SET_COOKIE, aHostURI, aCookieHeader, aCookie, foundCookie);
 
   // Now that list mutations are complete, notify observers. We do it here
   // because observers may themselves attempt to mutate the list.
   if (purgedList) {
-    NotifyChanged(purgedList, NS_LITERAL_STRING("batch-deleted").get());
+    NotifyChanged(purgedList, MOZ_UTF16("batch-deleted"));
   }
 
-  NotifyChanged(aCookie, foundCookie ? NS_LITERAL_STRING("changed").get()
-                                     : NS_LITERAL_STRING("added").get());
+  NotifyChanged(aCookie, foundCookie ? MOZ_UTF16("changed")
+                                     : MOZ_UTF16("added"));
 }
 
 /******************************************************************************
  * nsCookieService impl:
  * private cookie header parsing functions
  ******************************************************************************/
 
 // The following comment block elucidates the function of ParseAttributes.
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -1480,17 +1480,17 @@ nsHttpChannel::PromptTempRedirect()
             do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsIStringBundle> stringBundle;
     rv = bundleService->CreateBundle(NECKO_MSGS_URL, getter_AddRefs(stringBundle));
     if (NS_FAILED(rv)) return rv;
 
     nsXPIDLString messageString;
-    rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("RepostFormData").get(), getter_Copies(messageString));
+    rv = stringBundle->GetStringFromName(MOZ_UTF16("RepostFormData"), getter_Copies(messageString));
     // GetStringFromName can return NS_OK and nullptr messageString.
     if (NS_SUCCEEDED(rv) && messageString) {
         bool repost = false;
 
         nsCOMPtr<nsIPrompt> prompt;
         GetCallback(prompt);
         if (!prompt)
             return NS_ERROR_NO_INTERFACE;
--- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
@@ -108,32 +108,32 @@ mozTXTToHTMLConv::UnescapeStr(const PRUn
 {
   const PRUnichar * subString = nullptr;
   for (uint32_t i = aStartPos; int32_t(i) - aStartPos < aLength;)
   {
     int32_t remainingChars = i - aStartPos;
     if (aInString[i] == '&')
     {
       subString = &aInString[i];
-      if (!nsCRT::strncmp(subString, NS_LITERAL_STRING("&lt;").get(), MinInt(4, aLength - remainingChars)))
+      if (!nsCRT::strncmp(subString, MOZ_UTF16("&lt;"), MinInt(4, aLength - remainingChars)))
       {
         aOutString.Append(PRUnichar('<'));
         i += 4;
       }
-      else if (!nsCRT::strncmp(subString, NS_LITERAL_STRING("&gt;").get(), MinInt(4, aLength - remainingChars)))
+      else if (!nsCRT::strncmp(subString, MOZ_UTF16("&gt;"), MinInt(4, aLength - remainingChars)))
       {
         aOutString.Append(PRUnichar('>'));
         i += 4;
       }
-      else if (!nsCRT::strncmp(subString, NS_LITERAL_STRING("&amp;").get(), MinInt(5, aLength - remainingChars)))
+      else if (!nsCRT::strncmp(subString, MOZ_UTF16("&amp;"), MinInt(5, aLength - remainingChars)))
       {
         aOutString.Append(PRUnichar('&'));
         i += 5;
       }
-      else if (!nsCRT::strncmp(subString, NS_LITERAL_STRING("&quot;").get(), MinInt(6, aLength - remainingChars)))
+      else if (!nsCRT::strncmp(subString, MOZ_UTF16("&quot;"), MinInt(6, aLength - remainingChars)))
       {
         aOutString.Append(PRUnichar('"'));
         i += 6;
       }
       else
       {
         aOutString += aInString[i];
         i++;
@@ -164,50 +164,50 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL
     {
       aOutString.AssignLiteral("mailto:");
       aOutString += aInString;
     }
   }
   else if (aInString[pos] == '.')
   {
     if (ItMatchesDelimited(aInString, aInLength,
-                           NS_LITERAL_STRING("www.").get(), 4, LT_IGNORE, LT_IGNORE))
+                           MOZ_UTF16("www."), 4, LT_IGNORE, LT_IGNORE))
     {
       aOutString.AssignLiteral("http://");
       aOutString += aInString;
     }
-    else if (ItMatchesDelimited(aInString,aInLength, NS_LITERAL_STRING("ftp.").get(), 4, LT_IGNORE, LT_IGNORE))
+    else if (ItMatchesDelimited(aInString,aInLength, MOZ_UTF16("ftp."), 4, LT_IGNORE, LT_IGNORE))
     { 
       aOutString.AssignLiteral("ftp://");
       aOutString += aInString;
     }
   }
 }
 
 bool
 mozTXTToHTMLConv::FindURLStart(const PRUnichar * aInString, int32_t aInLength,
                                const uint32_t pos, const modetype check,
                                uint32_t& start)
 {
   switch(check)
   { // no breaks, because end of blocks is never reached
   case RFC1738:
   {
-    if (!nsCRT::strncmp(&aInString[MaxInt(pos - 4, 0)], NS_LITERAL_STRING("<URL:").get(), 5))
+    if (!nsCRT::strncmp(&aInString[MaxInt(pos - 4, 0)], MOZ_UTF16("<URL:"), 5))
     {
       start = pos + 1;
       return true;
     }
     else
       return false;
   }
   case RFC2396E:
   {
     nsString temp(aInString, aInLength);
-    int32_t i = pos <= 0 ? kNotFound : temp.RFindCharInSet(NS_LITERAL_STRING("<>\"").get(), pos - 1);
+    int32_t i = pos <= 0 ? kNotFound : temp.RFindCharInSet(MOZ_UTF16("<>\""), pos - 1);
     if (i != kNotFound && (temp[uint32_t(i)] == '<' ||
                            temp[uint32_t(i)] == '"'))
     {
       start = uint32_t(++i);
       return start < pos;
     }
     else
       return false;
@@ -276,17 +276,17 @@ mozTXTToHTMLConv::FindURLEnd(const PRUni
 {
   switch(check)
   { // no breaks, because end of blocks is never reached
   case RFC1738:
   case RFC2396E:
   {
     nsString temp(aInString, aInStringLength);
 
-    int32_t i = temp.FindCharInSet(NS_LITERAL_STRING("<>\"").get(), pos + 1);
+    int32_t i = temp.FindCharInSet(MOZ_UTF16("<>\""), pos + 1);
     if (i != kNotFound && temp[uint32_t(i--)] ==
         (check == RFC1738 || temp[start - 1] == '<' ? '>' : '"'))
     {
       end = uint32_t(i);
       return end > pos;
     }
     return false;
   }
@@ -914,25 +914,25 @@ mozTXTToHTMLConv::GlyphHit(const PRUnich
   {
       aOutputString.AppendLiteral("<span class='moz-txt-formfeed'></span>");
       glyphTextLen = 1;
       return true;
   }
   if (text0 == '+' || text1 == '+')
   {
     if (ItMatchesDelimited(aInString, aInLength,
-                           NS_LITERAL_STRING(" +/-").get(), 4,
+                           MOZ_UTF16(" +/-"), 4,
                            LT_IGNORE, LT_IGNORE))
     {
       aOutputString.AppendLiteral(" &plusmn;");
       glyphTextLen = 4;
       return true;
     }
     if (col0 && ItMatchesDelimited(aInString, aInLength,
-                                   NS_LITERAL_STRING("+/-").get(), 3,
+                                   MOZ_UTF16("+/-"), 3,
                                    LT_IGNORE, LT_IGNORE))
     {
       aOutputString.AppendLiteral("&plusmn;");
       glyphTextLen = 3;
       return true;
     }
   }
 
@@ -1116,48 +1116,48 @@ mozTXTToHTMLConv::ScanTXT(const PRUnicha
         newOffset = &aInString[i-1];
         newLength = aInStringLength - i + 1;
       }
 
       switch (aInString[i]) // Performance increase
       {
       case '*':
         if (StructPhraseHit(newOffset, newLength, i == 0,
-                            NS_LITERAL_STRING("*").get(), 1,
+                            MOZ_UTF16("*"), 1,
                             "b", "class=\"moz-txt-star\"",
                             aOutString, structPhrase_strong))
         {
           i++;
           continue;
         }
         break;
       case '/':
         if (StructPhraseHit(newOffset, newLength, i == 0,
-                            NS_LITERAL_STRING("/").get(), 1,
+                            MOZ_UTF16("/"), 1,
                             "i", "class=\"moz-txt-slash\"",
                             aOutString, structPhrase_italic))
         {
           i++;
           continue;
         }
         break;
       case '_':
         if (StructPhraseHit(newOffset, newLength, i == 0,
-                            NS_LITERAL_STRING("_").get(), 1,
+                            MOZ_UTF16("_"), 1,
                             "span" /* <u> is deprecated */,
                             "class=\"moz-txt-underscore\"",
                             aOutString, structPhrase_underline))
         {
           i++;
           continue;
         }
         break;
       case '|':
         if (StructPhraseHit(newOffset, newLength, i == 0,
-                            NS_LITERAL_STRING("|").get(), 1,
+                            MOZ_UTF16("|"), 1,
                             "code", "class=\"moz-txt-verticalline\"",
                             aOutString, structPhrase_code))
         {
           i++;
           continue;
         }
         break;
       }
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -532,17 +532,17 @@ nsIndexedToHTML::DoOnStartRequest(nsIReq
     htmlEscSpec.Adopt(nsEscapeHTML2(unEscapeSpec.get(),
                                     unEscapeSpec.Length()));
 
     nsXPIDLString title;
     const PRUnichar* formatTitle[] = {
         htmlEscSpec.get()
     };
 
-    rv = mBundle->FormatStringFromName(NS_LITERAL_STRING("DirTitle").get(),
+    rv = mBundle->FormatStringFromName(MOZ_UTF16("DirTitle"),
                                        formatTitle,
                                        sizeof(formatTitle)/sizeof(PRUnichar*),
                                        getter_Copies(title));
     if (NS_FAILED(rv)) return rv;
 
     // we want to convert string bundle to NCR
     // to ensure they're shown in any charsets
     AppendNonAsciiToNCR(title, buffer);
@@ -589,76 +589,76 @@ nsIndexedToHTML::DoOnStartRequest(nsIReq
     buffer.AppendLiteral("</head>\n<body dir=\"");
     buffer.Append(direction);
     buffer.AppendLiteral("\">\n<h1>");
     
     const PRUnichar* formatHeading[] = {
         htmlEscSpec.get()
     };
 
-    rv = mBundle->FormatStringFromName(NS_LITERAL_STRING("DirTitle").get(),
+    rv = mBundle->FormatStringFromName(MOZ_UTF16("DirTitle"),
                                        formatHeading,
                                        sizeof(formatHeading)/sizeof(PRUnichar*),
                                        getter_Copies(title));
     if (NS_FAILED(rv)) return rv;
     
     AppendNonAsciiToNCR(title, buffer);
     buffer.AppendLiteral("</h1>\n");
 
     if (!parentStr.IsEmpty()) {
         nsXPIDLString parentText;
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirGoUp").get(),
+        rv = mBundle->GetStringFromName(MOZ_UTF16("DirGoUp"),
                                         getter_Copies(parentText));
         if (NS_FAILED(rv)) return rv;
 
         buffer.AppendLiteral("<p id=\"UI_goUp\"><a class=\"up\" href=\"");
 
         NS_ConvertUTF8toUTF16 utf16ParentStr(parentStr);
         nsString htmlParentStr;
         htmlParentStr.Adopt(nsEscapeHTML2(utf16ParentStr.get(), utf16ParentStr.Length()));
         buffer.Append(htmlParentStr);
         buffer.AppendLiteral("\">");
         AppendNonAsciiToNCR(parentText, buffer);
         buffer.AppendLiteral("</a></p>\n");
     }
 
     if (isSchemeFile) {
         nsXPIDLString showHiddenText;
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("ShowHidden").get(),
+        rv = mBundle->GetStringFromName(MOZ_UTF16("ShowHidden"),
                                         getter_Copies(showHiddenText));
         if (NS_FAILED(rv)) return rv;
 
         buffer.AppendLiteral("<p id=\"UI_showHidden\" style=\"display:none\"><label><input type=\"checkbox\" checked onchange=\"updateHidden()\">");
         AppendNonAsciiToNCR(showHiddenText, buffer);
         buffer.AppendLiteral("</label></p>\n");
     }
 
     buffer.AppendLiteral("<table>\n");
 
     nsXPIDLString columnText;
 
     buffer.AppendLiteral(" <thead>\n"
                          "  <tr>\n"
                          "   <th>");
 
-    rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirColName").get(),
+    rv = mBundle->GetStringFromName(MOZ_UTF16("DirColName"),
                                     getter_Copies(columnText));
     if (NS_FAILED(rv)) return rv;
     AppendNonAsciiToNCR(columnText, buffer);
     buffer.AppendLiteral("</th>\n"
                          "   <th>");
 
-    rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirColSize").get(),
+    rv = mBundle->GetStringFromName(MOZ_UTF16("DirColSize"),
                                     getter_Copies(columnText));
     if (NS_FAILED(rv)) return rv;
     AppendNonAsciiToNCR(columnText, buffer);
     buffer.AppendLiteral("</th>\n"
                          "   <th colspan=\"2\">");
 
-    rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirColMTime").get(),
+    rv = mBundle->GetStringFromName(MOZ_UTF16("DirColMTime"),
                                     getter_Copies(columnText));
     if (NS_FAILED(rv)) return rv;
     AppendNonAsciiToNCR(columnText, buffer);
     buffer.AppendLiteral("</th>\n"
                          "  </tr>\n"
                          " </thead>\n");
     buffer.AppendLiteral(" <tbody>\n");
 
@@ -932,17 +932,17 @@ nsIndexedToHTML::OnIndexAvailable(nsIReq
             htmlFileExt.Adopt(nsEscapeHTML2(utf16LocEscaped.get(), utf16LocEscaped.Length()));
             pushBuffer.Append(htmlFileExt);
         } else {
             pushBuffer.AppendLiteral("unknown");
         }
         pushBuffer.AppendLiteral("?size=16\" alt=\"");
 
         nsXPIDLString altText;
-        rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirFileLabel").get(),
+        rv = mBundle->GetStringFromName(MOZ_UTF16("DirFileLabel"),
                                         getter_Copies(altText));
         if (NS_FAILED(rv)) return rv;
         AppendNonAsciiToNCR(altText, pushBuffer);
         pushBuffer.AppendLiteral("\">");
     }
 
     pushBuffer.Append(escapedShort);
     pushBuffer.AppendLiteral("</a></td>\n <td");
--- a/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp
+++ b/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp
@@ -5,17 +5,17 @@
 
 #include "nsTXTToHTMLConv.h"
 #include "nsEscape.h"
 #include "nsStringStream.h"
 #include "nsAutoPtr.h"
 #include "nsIChannel.h"
 #include <algorithm>
 
-#define TOKEN_DELIMITERS NS_LITERAL_STRING("\t\r\n ").get()
+#define TOKEN_DELIMITERS MOZ_UTF16("\t\r\n ")
 
 // nsISupports methods
 NS_IMPL_ISUPPORTS4(nsTXTToHTMLConv,
                    nsIStreamConverter,
                    nsITXTToHTMLConv,
                    nsIRequestObserver,
                    nsIStreamListener)
 
--- a/parser/html/nsHtml5PlainTextUtils.cpp
+++ b/parser/html/nsHtml5PlainTextUtils.cpp
@@ -26,15 +26,15 @@ nsHtml5PlainTextUtils::NewLinkAttributes
   nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
   NS_ASSERTION(NS_SUCCEEDED(rv) && bundleService, "The bundle service could not be loaded");
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://global/locale/browser.properties",
                                    getter_AddRefs(bundle));
   NS_ASSERTION(NS_SUCCEEDED(rv) && bundle, "chrome://global/locale/browser.properties could not be loaded");
   nsXPIDLString title;
   if (bundle) {
-    bundle->GetStringFromName(NS_LITERAL_STRING("plainText.wordWrap").get(), getter_Copies(title));
+    bundle->GetStringFromName(MOZ_UTF16("plainText.wordWrap"), getter_Copies(title));
   }
 
   nsString* titleCopy = new nsString(title);
   linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TITLE, titleCopy);
   return linkAttrs;
 }
--- a/rdf/base/src/nsRDFContainerUtils.cpp
+++ b/rdf/base/src/nsRDFContainerUtils.cpp
@@ -333,17 +333,17 @@ RDFContainerUtilsImpl::RDFContainerUtils
             gRDFService->GetResource(NS_LITERAL_CSTRING(RDF_NAMESPACE_URI "nextVal"),
                                      &kRDF_nextVal);
             gRDFService->GetResource(NS_LITERAL_CSTRING(RDF_NAMESPACE_URI "Bag"),
                                      &kRDF_Bag);
             gRDFService->GetResource(NS_LITERAL_CSTRING(RDF_NAMESPACE_URI "Seq"),
                                      &kRDF_Seq);
             gRDFService->GetResource(NS_LITERAL_CSTRING(RDF_NAMESPACE_URI "Alt"),
                                      &kRDF_Alt);
-            gRDFService->GetLiteral(NS_LITERAL_STRING("1").get(), &kOne);
+            gRDFService->GetLiteral(MOZ_UTF16("1"), &kOne);
         }
     }
 }
 
 
 RDFContainerUtilsImpl::~RDFContainerUtilsImpl()
 {
 #ifdef DEBUG_REFS
--- a/rdf/base/src/nsRDFContentSink.cpp
+++ b/rdf/base/src/nsRDFContentSink.cpp
@@ -1386,17 +1386,17 @@ RDFContentSinkImpl::ReinitContainer(nsIR
     // Mega-kludge to deal with the fact that Make[Seq|Alt|Bag] is
     // idempotent, and as such, containers will have state (e.g.,
     // RDF:nextVal) maintained in the graph across loads. This
     // re-initializes each container's RDF:nextVal to '1', and 'marks'
     // the container as such.
     nsresult rv;
 
     nsCOMPtr<nsIRDFLiteral> one;
-    rv = gRDFService->GetLiteral(NS_LITERAL_STRING("1").get(), getter_AddRefs(one));
+    rv = gRDFService->GetLiteral(MOZ_UTF16("1"), getter_AddRefs(one));
     if (NS_FAILED(rv)) return rv;
 
     // Re-initialize the 'nextval' property
     nsCOMPtr<nsIRDFNode> nextval;
     rv = mDataSource->GetTarget(aContainer, kRDF_nextVal, true, getter_AddRefs(nextval));
     if (NS_FAILED(rv)) return rv;
 
     rv = mDataSource->Change(aContainer, kRDF_nextVal, nextval, one);
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -292,17 +292,17 @@ FileSystemDataSource::GetTarget(nsIRDFRe
     if (! tv)
         return NS_RDF_NO_VALUE;
 
     if (source == mNC_FileSystemRoot)
     {
         if (property == mNC_pulse)
         {
             nsIRDFLiteral   *pulseLiteral;
-            mRDFService->GetLiteral(NS_LITERAL_STRING("12").get(), &pulseLiteral);
+            mRDFService->GetLiteral(MOZ_UTF16("12"), &pulseLiteral);
             *target = pulseLiteral;
             return NS_OK;
         }
     }
     else if (isFileURI(source))
     {
         if (property == mNC_Name)
         {
@@ -404,17 +404,17 @@ FileSystemDataSource::GetTarget(nsIRDFRe
             nsCOMPtr<nsIRDFLiteral> literal;
             mRDFService->GetLiteral(url.get(), getter_AddRefs(literal));
             rv = literal->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) target);
             return(rv);
         }
         else if (property == mNC_pulse)
         {
             nsCOMPtr<nsIRDFLiteral> pulseLiteral;
-            mRDFService->GetLiteral(NS_LITERAL_STRING("12").get(), getter_AddRefs(pulseLiteral));
+            mRDFService->GetLiteral(MOZ_UTF16("12"), getter_AddRefs(pulseLiteral));
             rv = pulseLiteral->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) target);
             return(rv);
         }
         else if (property == mNC_Child)
         {
             // Oh this is evil. Somebody kill me now.
             nsCOMPtr<nsISimpleEnumerator> children;
             rv = GetFolderList(source, false, true, getter_AddRefs(children));
@@ -480,17 +480,17 @@ FileSystemDataSource::GetTargets(nsIRDFR
     {
         if (property == mNC_Child)
         {
             return GetVolumeList(targets);
         }
         else if (property == mNC_pulse)
         {
             nsCOMPtr<nsIRDFLiteral> pulseLiteral;
-            mRDFService->GetLiteral(NS_LITERAL_STRING("12").get(),
+            mRDFService->GetLiteral(MOZ_UTF16("12"),
                                     getter_AddRefs(pulseLiteral));
             return NS_NewSingletonEnumerator(targets, pulseLiteral);
         }
     }
     else if (isFileURI(source))
     {
         if (property == mNC_Child)
         {
@@ -524,17 +524,17 @@ FileSystemDataSource::GetTargets(nsIRDFR
             rv = mRDFService->GetLiteral(url.get(), getter_AddRefs(literal));
             if (NS_FAILED(rv)) return rv;
 
             return NS_NewSingletonEnumerator(targets, literal);
         }
         else if (property == mNC_pulse)
         {
             nsCOMPtr<nsIRDFLiteral> pulseLiteral;
-            rv = mRDFService->GetLiteral(NS_LITERAL_STRING("12").get(),
+            rv = mRDFService->GetLiteral(MOZ_UTF16("12"),
                 getter_AddRefs(pulseLiteral));
             if (NS_FAILED(rv)) return rv;
 
             return NS_NewSingletonEnumerator(targets, pulseLiteral);
         }
     }
 
     return NS_NewEmptyEnumerator(targets);
--- a/security/manager/boot/src/nsSecurityWarningDialogs.cpp
+++ b/security/manager/boot/src/nsSecurityWarningDialogs.cpp
@@ -50,17 +50,17 @@ nsSecurityWarningDialogs::Init()
 
 NS_IMETHODIMP 
 nsSecurityWarningDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, bool* _result)
 {
   nsresult rv;
 
   // The Telemetry clickthrough constant is 1 more than the constant for the dialog.
   rv = ConfirmDialog(ctx, nullptr, // No preference for this one - it's too important
-                     NS_LITERAL_STRING("PostToInsecureFromSecureMessage").get(),
+                     MOZ_UTF16("PostToInsecureFromSecureMessage"),
                      nullptr,
                      nsISecurityUITelemetry::WARNING_CONFIRM_POST_TO_INSECURE_FROM_SECURE,
                      _result);
 
   return rv;
 }
 
 nsresult
@@ -101,25 +101,25 @@ nsSecurityWarningDialogs::ConfirmDialog(
 
   // Get Prompt to use
   nsCOMPtr<nsIPrompt> prompt = do_GetInterface(ctx);
   if (!prompt) return NS_ERROR_FAILURE;
 
   // Get messages strings from localization file
   nsXPIDLString windowTitle, message, alertMe, cont;
 
-  mStringBundle->GetStringFromName(NS_LITERAL_STRING("Title").get(),
+  mStringBundle->GetStringFromName(MOZ_UTF16("Title"),
                                    getter_Copies(windowTitle));
   mStringBundle->GetStringFromName(messageName,
                                    getter_Copies(message));
   if (showAgainName) {
     mStringBundle->GetStringFromName(showAgainName,
                                      getter_Copies(alertMe));
   }
-  mStringBundle->GetStringFromName(NS_LITERAL_STRING("Continue").get(),
+  mStringBundle->GetStringFromName(MOZ_UTF16("Continue"),
                                    getter_Copies(cont));
   // alertMe is allowed to be null
   if (!windowTitle || !message || !cont) return NS_ERROR_FAILURE;
       
   // Replace # characters with newlines to lay out the dialog.
   PRUnichar* msgchars = message.BeginWriting();
   
   uint32_t i = 0;
--- a/security/manager/pki/src/nsNSSDialogs.cpp
+++ b/security/manager/pki/src/nsNSSDialogs.cpp
@@ -198,22 +198,22 @@ nsNSSDialogs::NotifyCACertExists(nsIInte
   nsCOMPtr<nsIPromptService> promptSvc(do_GetService(NS_PROMPTSERVICE_CONTRACTID));
   if (!promptSvc)
     return NS_ERROR_FAILURE;
 
   // Get the parent window for the dialog
   nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   nsAutoString title;
-  rv = mPIPStringBundle->GetStringFromName(NS_LITERAL_STRING("caCertExistsTitle").get(),
+  rv = mPIPStringBundle->GetStringFromName(MOZ_UTF16("caCertExistsTitle"),
                                            getter_Copies(title));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString msg;
-  rv = mPIPStringBundle->GetStringFromName(NS_LITERAL_STRING("caCertExistsMessage").get(),
+  rv = mPIPStringBundle->GetStringFromName(MOZ_UTF16("caCertExistsMessage"),
                                            getter_Copies(msg));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = promptSvc->Alert(parent, title.get(), msg.get());
 
   return rv;
 }
 
--- a/security/manager/ssl/src/nsCertOverrideService.cpp
+++ b/security/manager/ssl/src/nsCertOverrideService.cpp
@@ -140,17 +140,17 @@ nsCertOverrideService::Observe(nsISuppor
 {
   // check the topic
   if (!nsCRT::strcmp(aTopic, "profile-before-change")) {
     // The profile is about to change,
     // or is going away because the application is shutting down.
 
     ReentrantMonitorAutoEnter lock(monitor);
 
-    if (!nsCRT::strcmp(aData, NS_LITERAL_STRING("shutdown-cleanse").get())) {
+    if (!nsCRT::strcmp(aData, MOZ_UTF16("shutdown-cleanse"))) {
       RemoveAllFromMemory();
       // delete the storage file
       if (mSettingsFile) {
         mSettingsFile->Remove(false);
       }
     } else {
       RemoveAllFromMemory();
     }
--- a/security/manager/ssl/src/nsCrypto.cpp
+++ b/security/manager/ssl/src/nsCrypto.cpp
@@ -2119,20 +2119,20 @@ nsP12Runnable::Run()
 
   nsCOMPtr<nsINSSComponent> nssComponent(do_GetService(kNSSComponentCID, &rv));
   if (NS_FAILED(rv))
     return rv;
 
   //Build up the message that let's the user know we're trying to 
   //make PKCS12 backups of the new certs.
   nssComponent->GetPIPNSSBundleString("ForcedBackup1", final);
-  final.Append(NS_LITERAL_STRING("\n\n").get());
+  final.Append(MOZ_UTF16("\n\n"));
   nssComponent->GetPIPNSSBundleString("ForcedBackup2", temp);
   final.Append(temp.get());
-  final.Append(NS_LITERAL_STRING("\n\n").get());
+  final.Append(MOZ_UTF16("\n\n"));
 
   nssComponent->GetPIPNSSBundleString("ForcedBackup3", temp);
 
   final.Append(temp.get());
   nsNSSComponent::ShowAlertWithConstructedString(final);
 
   nsCOMPtr<nsIFilePicker> filePicker = 
                         do_CreateInstance("@mozilla.org/filepicker;1", &rv);
--- a/toolkit/components/commandlines/nsCommandLine.cpp
+++ b/toolkit/components/commandlines/nsCommandLine.cpp
@@ -546,17 +546,17 @@ nsCommandLine::EnumerateHandlers(Enumera
     rv = catman->GetCategoryEntry("command-line-handler",
 				  entry.get(),
 				  getter_Copies(contractID));
     if (NS_FAILED(rv))
       continue;
 
     nsCOMPtr<nsICommandLineHandler> clh(do_GetService(contractID.get()));
     if (!clh) {
-      LogConsoleMessage(NS_LITERAL_STRING("Contract ID '%s' was registered as a command line handler for entry '%s', but could not be created.").get(),
+      LogConsoleMessage(MOZ_UTF16("Contract ID '%s' was registered as a command line handler for entry '%s', but could not be created."),
                         contractID.get(), entry.get());
       continue;
     }
 
     rv = (aCallback)(clh, this, aClosure);
     if (rv == NS_ERROR_ABORT)
       break;
 
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -1365,17 +1365,17 @@ nsDownloadManager::GetDefaultDownloadsDi
   // Vista:
   // Downloads
   // XP/2K:
   // My Documents/Downloads
   // Linux:
   // XDG user dir spec, with a fallback to Home/Downloads
 
   nsXPIDLString folderName;
-  mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
+  mBundle->GetStringFromName(MOZ_UTF16("downloadsFolder"),
                              getter_Copies(folderName));
 
 #if defined (XP_MACOSX)
   rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR,
                        NS_GET_IID(nsIFile),
                        getter_AddRefs(downloadDir));
   NS_ENSURE_SUCCESS(rv, rv);
 #elif defined(XP_WIN)
@@ -2433,52 +2433,52 @@ nsDownloadManager::Observe(nsISupports *
       CleanUp();
   } else if (strcmp(aTopic, "quit-application-requested") == 0 &&
              currDownloadCount) {
     nsCOMPtr<nsISupportsPRBool> cancelDownloads =
       do_QueryInterface(aSubject, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 #ifndef XP_MACOSX
     ConfirmCancelDownloads(currDownloadCount, cancelDownloads,
-                           NS_LITERAL_STRING("quitCancelDownloadsAlertTitle").get(),
-                           NS_LITERAL_STRING("quitCancelDownloadsAlertMsgMultiple").get(),
-                           NS_LITERAL_STRING("quitCancelDownloadsAlertMsg").get(),
-                           NS_LITERAL_STRING("dontQuitButtonWin").get());
+                           MOZ_UTF16("quitCancelDownloadsAlertTitle"),
+                           MOZ_UTF16("quitCancelDownloadsAlertMsgMultiple"),
+                           MOZ_UTF16("quitCancelDownloadsAlertMsg"),
+                           MOZ_UTF16("dontQuitButtonWin"));
 #else
     ConfirmCancelDownloads(currDownloadCount, cancelDownloads,
-                           NS_LITERAL_STRING("quitCancelDownloadsAlertTitle").get(),
-                           NS_LITERAL_STRING("quitCancelDownloadsAlertMsgMacMultiple").get(),
-                           NS_LITERAL_STRING("quitCancelDownloadsAlertMsgMac").get(),
-                           NS_LITERAL_STRING("dontQuitButtonMac").get());
+                           MOZ_UTF16("quitCancelDownloadsAlertTitle"),
+                           MOZ_UTF16("quitCancelDownloadsAlertMsgMacMultiple"),
+                           MOZ_UTF16("quitCancelDownloadsAlertMsgMac"),
+                           MOZ_UTF16("dontQuitButtonMac"));
 #endif
   } else if (strcmp(aTopic, "offline-requested") == 0 && currDownloadCount) {
     nsCOMPtr<nsISupportsPRBool> cancelDownloads =
       do_QueryInterface(aSubject, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     ConfirmCancelDownloads(currDownloadCount, cancelDownloads,
-                           NS_LITERAL_STRING("offlineCancelDownloadsAlertTitle").get(),
-                           NS_LITERAL_STRING("offlineCancelDownloadsAlertMsgMultiple").get(),
-                           NS_LITERAL_STRING("offlineCancelDownloadsAlertMsg").get(),
-                           NS_LITERAL_STRING("dontGoOfflineButton").get());
+                           MOZ_UTF16("offlineCancelDownloadsAlertTitle"),
+                           MOZ_UTF16("offlineCancelDownloadsAlertMsgMultiple"),
+                           MOZ_UTF16("offlineCancelDownloadsAlertMsg"),
+                           MOZ_UTF16("dontGoOfflineButton"));
   }
   else if (strcmp(aTopic, NS_IOSERVICE_GOING_OFFLINE_TOPIC) == 0) {
     // Pause all downloads, and mark them to auto-resume.
     (void)PauseAllDownloads(true);
   }
   else if (strcmp(aTopic, NS_IOSERVICE_OFFLINE_STATUS_TOPIC) == 0 &&
            nsDependentString(aData).EqualsLiteral(NS_IOSERVICE_ONLINE)) {
     // We can now resume all downloads that are supposed to auto-resume.
     (void)ResumeAllDownloads(false);
   }
   else if (strcmp(aTopic, "alertclickcallback") == 0) {
     nsCOMPtr<nsIDownloadManagerUI> dmui =
       do_GetService("@mozilla.org/download-manager-ui;1", &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     return dmui->Show(nullptr, nullptr, nsIDownloadManagerUI::REASON_USER_INTERACTED,
-                      aData && NS_strcmp(aData, NS_LITERAL_STRING("private").get()) == 0);
+                      aData && NS_strcmp(aData, MOZ_UTF16("private")) == 0);
   } else if (strcmp(aTopic, "sleep_notification") == 0 ||
              strcmp(aTopic, "suspend_process_notification") == 0) {
     // Pause downloads if we're sleeping, and mark the downloads as auto-resume
     (void)PauseAllDownloads(true);
   } else if (strcmp(aTopic, "wake_notification") == 0 ||
              strcmp(aTopic, "resume_process_notification") == 0) {
     int32_t resumeOnWakeDelay = 10000;
     nsCOMPtr<nsIPrefBranch> pref = do_GetService(NS_PREFSERVICE_CONTRACTID);
@@ -2503,20 +2503,20 @@ nsDownloadManager::Observe(nsISupports *
     // private browsing mode (thereby cancelling them). Otherwise, silently proceed.
     if (!mCurrentPrivateDownloads.Count())
       return NS_OK;
 
     nsCOMPtr<nsISupportsPRBool> cancelDownloads = do_QueryInterface(aSubject, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     ConfirmCancelDownloads(mCurrentPrivateDownloads.Count(), cancelDownloads,
-                           NS_LITERAL_STRING("leavePrivateBrowsingCancelDownloadsAlertTitle").get(),
-                           NS_LITERAL_STRING("leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple").get(),
-                           NS_LITERAL_STRING("leavePrivateBrowsingWindowsCancelDownloadsAlertMsg").get(),
-                           NS_LITERAL_STRING("dontLeavePrivateBrowsingButton").get());
+                           MOZ_UTF16("leavePrivateBrowsingCancelDownloadsAlertTitle"),
+                           MOZ_UTF16("leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple"),
+                           MOZ_UTF16("leavePrivateBrowsingWindowsCancelDownloadsAlertMsg"),
+                           MOZ_UTF16("dontLeavePrivateBrowsingButton"));
   }
 
   return NS_OK;
 }
 
 void
 nsDownloadManager::ConfirmCancelDownloads(int32_t aCount,
                                           nsISupportsPRBool *aCancelDownloads,
@@ -2536,31 +2536,31 @@ nsDownloadManager::ConfirmCancelDownload
   mBundle->GetStringFromName(aTitle, getter_Copies(title));
 
   nsAutoString countString;
   countString.AppendInt(aCount);
   const PRUnichar *strings[1] = { countString.get() };
   if (aCount > 1) {
     mBundle->FormatStringFromName(aCancelMessageMultiple, strings, 1,
                                   getter_Copies(message));
-    mBundle->FormatStringFromName(NS_LITERAL_STRING("cancelDownloadsOKTextMultiple").get(),
+    mBundle->FormatStringFromName(MOZ_UTF16("cancelDownloadsOKTextMultiple"),
                                   strings, 1, getter_Copies(quitButton));
   } else {
     mBundle->GetStringFromName(aCancelMessageSingle, getter_Copies(message));
-    mBundle->GetStringFromName(NS_LITERAL_STRING("cancelDownloadsOKText").get(),
+    mBundle->GetStringFromName(MOZ_UTF16("cancelDownloadsOKText"),
                                getter_Copies(quitButton));
   }
 
   mBundle->GetStringFromName(aDontCancelButton, getter_Copies(dontQuitButton));
 
   // Get Download Manager window, to be parent of alert.
   nsCOMPtr<nsIWindowMediator> wm = do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
   nsCOMPtr<nsIDOMWindow> dmWindow;
   if (wm) {
-    wm->GetMostRecentWindow(NS_LITERAL_STRING("Download:Manager").get(),
+    wm->GetMostRecentWindow(MOZ_UTF16("Download:Manager"),
                             getter_AddRefs(dmWindow));
   }
 
   // Show alert.
   nsCOMPtr<nsIPromptService> prompter(do_GetService(NS_PROMPTSERVICE_CONTRACTID));
   if (prompter) {
     int32_t flags = (nsIPromptService::BUTTON_TITLE_IS_STRING * nsIPromptService::BUTTON_POS_0) + (nsIPromptService::BUTTON_TITLE_IS_STRING * nsIPromptService::BUTTON_POS_1);
     bool nothing = false;
@@ -2703,20 +2703,20 @@ nsDownload::SetState(DownloadState aStat
             mDownloadManager->mCurrentDownloads.Count();
         if (showTaskbarAlert && size == 0) {
           nsCOMPtr<nsIAlertsService> alerts =
             do_GetService("@mozilla.org/alerts-service;1");
           if (alerts) {
               nsXPIDLString title, message;
 
               mDownloadManager->mBundle->GetStringFromName(
-                  NS_LITERAL_STRING("downloadsCompleteTitle").get(),
+                  MOZ_UTF16("downloadsCompleteTitle"),
                   getter_Copies(title));
               mDownloadManager->mBundle->GetStringFromName(
-                  NS_LITERAL_STRING("downloadsCompleteMsg").get(),
+                  MOZ_UTF16("downloadsCompleteMsg"),
                   getter_Copies(message));
 
               bool removeWhenDone =
                 mDownloadManager->GetRetentionBehavior() == 0;
 
               // If downloads are automatically removed per the user's
               // retention policy, there's no reason to make the text clickable
               // because if it is, they'll click open the download manager and
@@ -3674,34 +3674,34 @@ nsDownload::FailDownload(nsresult aStatu
   // Grab the bundle before potentially losing our member variables
   nsCOMPtr<nsIStringBundle> bundle = mDownloadManager->mBundle;
 
   (void)SetState(nsIDownloadManager::DOWNLOAD_FAILED);
 
   // Get title for alert.
   nsXPIDLString title;
   nsresult rv = bundle->GetStringFromName(
-    NS_LITERAL_STRING("downloadErrorAlertTitle").get(), getter_Copies(title));
+    MOZ_UTF16("downloadErrorAlertTitle"), getter_Copies(title));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get a generic message if we weren't supplied one
   nsXPIDLString message;
   message = aMessage;
   if (message.IsEmpty()) {
     rv = bundle->GetStringFromName(
-      NS_LITERAL_STRING("downloadErrorGeneric").get(), getter_Copies(message));
+      MOZ_UTF16("downloadErrorGeneric"), getter_Copies(message));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // Get Download Manager window to be parent of alert
   nsCOMPtr<nsIWindowMediator> wm =
     do_GetService(NS_WINDOWMEDIATOR_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIDOMWindow> dmWindow;
-  rv = wm->GetMostRecentWindow(NS_LITERAL_STRING("Download:Manager").get(),
+  rv = wm->GetMostRecentWindow(MOZ_UTF16("Download:Manager"),
                                getter_AddRefs(dmWindow));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Show alert
   nsCOMPtr<nsIPromptService> prompter =
     do_GetService("@mozilla.org/embedcomp/prompt-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   return prompter->Alert(dmWindow, title, message);
--- a/toolkit/components/filepicker/nsFileView.cpp
+++ b/toolkit/components/filepicker/nsFileView.cpp
@@ -849,17 +849,17 @@ nsFileView::FilterFiles()
       // need to check return value for GetLeafName()
       continue;
     }
     
     if (!isHidden) {
       for (uint32_t j = 0; j < filterCount; ++j) {
         bool matched = false;
         if (!nsCRT::strcmp(mCurrentFilters.ElementAt(j),
-                           NS_LITERAL_STRING("..apps").get()))
+                           MOZ_UTF16("..apps")))
         {
           file->IsExecutable(&matched);
         } else
           matched = (NS_WildCardMatch(ucsLeafName.get(),
                                       mCurrentFilters.ElementAt(j),
                                       true) == MATCH);
 
         if (matched) {
--- a/toolkit/components/places/Database.cpp
+++ b/toolkit/components/places/Database.cpp
@@ -867,35 +867,35 @@ Database::CreateBookmarkRoots()
   if (NS_FAILED(rv)) return rv;
 
   nsXPIDLString rootTitle;
   // The first root's title is an empty string.
   rv = CreateRoot(mMainConn, NS_LITERAL_CSTRING("places"), rootTitle);
   if (NS_FAILED(rv)) return rv;
 
   // Fetch the internationalized folder name from the string bundle.
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("BookmarksMenuFolderTitle").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("BookmarksMenuFolderTitle"),
                                  getter_Copies(rootTitle));
   if (NS_FAILED(rv)) return rv;
   rv = CreateRoot(mMainConn, NS_LITERAL_CSTRING("menu"), rootTitle);
   if (NS_FAILED(rv)) return rv;
 
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("BookmarksToolbarFolderTitle").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("BookmarksToolbarFolderTitle"),
                                  getter_Copies(rootTitle));
   if (NS_FAILED(rv)) return rv;
   rv = CreateRoot(mMainConn, NS_LITERAL_CSTRING("toolbar"), rootTitle);
   if (NS_FAILED(rv)) return rv;
 
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("TagsFolderTitle").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("TagsFolderTitle"),
                                  getter_Copies(rootTitle));
   if (NS_FAILED(rv)) return rv;
   rv = CreateRoot(mMainConn, NS_LITERAL_CSTRING("tags"), rootTitle);
   if (NS_FAILED(rv)) return rv;
 
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("UnsortedBookmarksFolderTitle").get(),
+  rv = bundle->GetStringFromName(MOZ_UTF16("UnsortedBookmarksFolderTitle"),
                                  getter_Copies(rootTitle));
   if (NS_FAILED(rv)) return rv;
   rv = CreateRoot(mMainConn, NS_LITERAL_CSTRING("unfiled"), rootTitle);
   if (NS_FAILED(rv)) return rv;
 
 #if DEBUG
   nsCOMPtr<mozIStorageStatement> stmt;
   rv = mMainConn->CreateStatement(NS_LITERAL_CSTRING(
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -1527,78 +1527,78 @@ PlacesSQLQueryBuilder::SelectAsDay()
     // These are used as limits for the inside containers.
     nsAutoCString sqlFragmentContainerBeginTime, sqlFragmentContainerEndTime;
     // These are used to query if the container should be visible.
     nsAutoCString sqlFragmentSearchBeginTime, sqlFragmentSearchEndTime;
     switch(i) {
        case 0:
         // Today
          history->GetStringFromName(
-          NS_LITERAL_STRING("finduri-AgeInDays-is-0").get(), dateName);
+          MOZ_UTF16("finduri-AgeInDays-is-0"), dateName);
         // From start of today
         sqlFragmentContainerBeginTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','utc')*1000000)");
         // To now (tomorrow)
         sqlFragmentContainerEndTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','+1 day','utc')*1000000)");
         // Search for the same timeframe.
         sqlFragmentSearchBeginTime = sqlFragmentContainerBeginTime;
         sqlFragmentSearchEndTime = sqlFragmentContainerEndTime;
          break;
        case 1:
         // Yesterday
          history->GetStringFromName(
-          NS_LITERAL_STRING("finduri-AgeInDays-is-1").get(), dateName);
+          MOZ_UTF16("finduri-AgeInDays-is-1"), dateName);
         // From start of yesterday
         sqlFragmentContainerBeginTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','-1 day','utc')*1000000)");
         // To start of today
         sqlFragmentContainerEndTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','utc')*1000000)");
         // Search for the same timeframe.
         sqlFragmentSearchBeginTime = sqlFragmentContainerBeginTime;
         sqlFragmentSearchEndTime = sqlFragmentContainerEndTime;
         break;
       case 2:
         // Last 7 days
         history->GetAgeInDaysString(7,
-          NS_LITERAL_STRING("finduri-AgeInDays-last-is").get(), dateName);
+          MOZ_UTF16("finduri-AgeInDays-last-is"), dateName);
         // From start of 7 days ago
         sqlFragmentContainerBeginTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','-7 days','utc')*1000000)");
         // To now (tomorrow)
         sqlFragmentContainerEndTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','+1 day','utc')*1000000)");
         // This is an overlapped container, but we show it only if there are
         // visits older than yesterday.
         sqlFragmentSearchBeginTime = sqlFragmentContainerBeginTime;
         sqlFragmentSearchEndTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','-2 days','utc')*1000000)");
         break;
       case 3:
         // This month
         history->GetStringFromName(
-          NS_LITERAL_STRING("finduri-AgeInMonths-is-0").get(), dateName);
+          MOZ_UTF16("finduri-AgeInMonths-is-0"), dateName);
         // From start of this month
         sqlFragmentContainerBeginTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of month','utc')*1000000)");
         // To now (tomorrow)
         sqlFragmentContainerEndTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','+1 day','utc')*1000000)");
         // This is an overlapped container, but we show it only if there are
         // visits older than 7 days ago.
         sqlFragmentSearchBeginTime = sqlFragmentContainerBeginTime;
         sqlFragmentSearchEndTime = NS_LITERAL_CSTRING(
           "(strftime('%s','now','localtime','start of day','-7 days','utc')*1000000)");
          break;
        default:
         if (i == HISTORY_ADDITIONAL_DATE_CONT_NUM + 6) {
           // Older than 6 months
           history->GetAgeInDaysString(6,
-            NS_LITERAL_STRING("finduri-AgeInMonths-isgreater").get(), dateName);
+            MOZ_UTF16("finduri-AgeInMonths-isgreater"), dateName);
           // From start of epoch
           sqlFragmentContainerBeginTime = NS_LITERAL_CSTRING(
             "(datetime(0, 'unixepoch')*1000000)");
           // To start of 6 months ago ( 5 months + this month).
           sqlFragmentContainerEndTime = NS_LITERAL_CSTRING(
             "(strftime('%s','now','localtime','start of month','-5 months','utc')*1000000)");
           // Search for the same timeframe.
           sqlFragmentSearchBeginTime = sqlFragmentContainerBeginTime;
@@ -1688,17 +1688,17 @@ PlacesSQLQueryBuilder::SelectAsDay()
 nsresult
 PlacesSQLQueryBuilder::SelectAsSite()
 {
   nsAutoCString localFiles;
 
   nsNavHistory *history = nsNavHistory::GetHistoryService();
   NS_ENSURE_STATE(history);
 
-  history->GetStringFromName(NS_LITERAL_STRING("localhost").get(), localFiles);
+  history->GetStringFromName(MOZ_UTF16("localhost"), localFiles);
   mAddParams.Put(NS_LITERAL_CSTRING("localhost"), localFiles);
 
   // If there are additional conditions the query has to join on visits too.
   nsAutoCString visitsJoin;
   nsAutoCString additionalConditions;
   nsAutoCString timeConstraints;
   if (!mConditions.IsEmpty()) {
     visitsJoin.AssignLiteral("JOIN moz_historyvisits v ON v.place_id = h.id ");
@@ -4112,17 +4112,17 @@ void
 nsNavHistory::TitleForDomain(const nsCString& domain, nsACString& aTitle)
 {
   if (! domain.IsEmpty()) {
     aTitle = domain;
     return;
   }
 
   // use the localized one instead
-  GetStringFromName(NS_LITERAL_STRING("localhost").get(), aTitle);
+  GetStringFromName(MOZ_UTF16("localhost"), aTitle);
 }
 
 void
 nsNavHistory::GetAgeInDaysString(int32_t aInt, const PRUnichar *aName,
                                  nsACString& aResult)
 {
   nsIStringBundle *bundle = GetBundle();
   if (bundle) {
@@ -4182,17 +4182,17 @@ nsNavHistory::GetMonthYear(int32_t aMont
     nsAutoString yearString;
     yearString.AppendInt(aYear);
     const PRUnichar* strings[2] = {
       NS_ConvertUTF8toUTF16(monthName).get()
     , yearString.get()
     };
     nsXPIDLString value;
     if (NS_SUCCEEDED(bundle->FormatStringFromName(
-          NS_LITERAL_STRING("finduri-MonthYear").get(), strings, 2,
+          MOZ_UTF16("finduri-MonthYear"), strings, 2,
           getter_Copies(value)
         ))) {
       CopyUTF16toUTF8(value, aResult);
       return;
     }
   }
   aResult.AppendLiteral("finduri-MonthYear");
 }
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -4713,17 +4713,17 @@ nsNavHistoryResult::OnVisit(nsIURI* aURI
       NS_ENSURE_SUCCESS(rv, rv);
       nsAutoCString title;
       rv = firstChild->GetTitle(title);
       NS_ENSURE_SUCCESS(rv, rv);
       nsNavHistory* history = nsNavHistory::GetHistoryService();
       NS_ENSURE_TRUE(history, NS_OK);
       nsAutoCString todayLabel;
       history->GetStringFromName(
-        NS_LITERAL_STRING("finduri-AgeInDays-is-0").get(), todayLabel);
+        MOZ_UTF16("finduri-AgeInDays-is-0"), todayLabel);
       todayIsMissing = !todayLabel.Equals(title);
     }
   }
 
   if (!added || todayIsMissing) {
     // None of registered query observers has accepted our URI.  This means,
     // that a matching query either was not expanded or it does not exist.
     uint32_t resultType = mRootNode->mOptions->ResultType();
--- a/toolkit/system/gnome/nsAlertsIconListener.cpp
+++ b/toolkit/system/gnome/nsAlertsIconListener.cpp
@@ -257,17 +257,17 @@ nsAlertsIconListener::InitAlertAsync(con
     nsAutoCString appShortName;
     if (bundleService) {
       nsCOMPtr<nsIStringBundle> bundle;
       bundleService->CreateBundle("chrome://branding/locale/brand.properties",
                                   getter_AddRefs(bundle));
       nsAutoString appName;
 
       if (bundle) {
-        bundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+        bundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                   getter_Copies(appName));
         appShortName = NS_ConvertUTF16toUTF8(appName);
       } else {
         NS_WARNING("brand.properties not present, using default application name");
         appShortName.AssignLiteral("Mozilla");
       }
     } else {
       appShortName.AssignLiteral("Mozilla");
--- a/toolkit/xre/ProfileReset.cpp
+++ b/toolkit/xre/ProfileReset.cpp
@@ -75,17 +75,17 @@ ProfileResetCleanup(nsIToolkitProfile* a
   rv = sbs->CreateBundle(kProfileProperties, getter_AddRefs(sb));
   if (!sb) return NS_ERROR_FAILURE;
 
   NS_ConvertUTF8toUTF16 appName(gAppData->name);
   const PRUnichar* params[] = {appName.get(), appName.get()};
 
   nsXPIDLString resetBackupDirectoryName;
 
-  static const PRUnichar* kResetBackupDirectory = NS_LITERAL_STRING("resetBackupDirectory").get();
+  static const PRUnichar* kResetBackupDirectory = MOZ_UTF16("resetBackupDirectory");
   rv = sb->FormatStringFromName(kResetBackupDirectory, params, 2,
                                 getter_Copies(resetBackupDirectoryName));
 
   // Get info to copy the old root profile dir to the desktop as a backup.
   nsCOMPtr<nsIFile> backupDest, containerDest, profileDest;
   rv = NS_GetSpecialDirectory(NS_OS_DESKTOP_DIR, getter_AddRefs(backupDest));
   if (NS_FAILED(rv)) {
     // Fall back to the home directory if the desktop is not available.
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1774,17 +1774,17 @@ ProfileLockedDialog(nsIFile* aProfileDir
     static const PRUnichar kRestartNoUnlocker[] = {'r','e','s','t','a','r','t','M','e','s','s','a','g','e','N','o','U','n','l','o','c','k','e','r','M','a','c','\0'}; // "restartMessageNoUnlockerMac"
     static const PRUnichar kRestartUnlocker[] = {'r','e','s','t','a','r','t','M','e','s','s','a','g','e','U','n','l','o','c','k','e','r','M','a','c','\0'}; // "restartMessageUnlockerMac"
 #endif
 
     sb->FormatStringFromName(aUnlocker ? kRestartUnlocker : kRestartNoUnlocker,
                              params, 2, getter_Copies(killMessage));
 
     nsXPIDLString killTitle;
-    sb->FormatStringFromName(NS_LITERAL_STRING("restartTitle").get(),
+    sb->FormatStringFromName(MOZ_UTF16("restartTitle"),
                              params, 1, getter_Copies(killTitle));
 
     if (!killMessage || !killTitle)
       return NS_ERROR_FAILURE;
 
     nsCOMPtr<nsIPromptService> ps
       (do_GetService(NS_PROMPTSERVICE_CONTRACTID));
     NS_ENSURE_TRUE(ps, NS_ERROR_FAILURE);
@@ -1860,17 +1860,17 @@ ProfileMissingDialog(nsINativeAppSupport
   
     nsXPIDLString missingMessage;
   
     // profileMissing  
     static const PRUnichar kMissing[] = {'p','r','o','f','i','l','e','M','i','s','s','i','n','g','\0'};
     sb->FormatStringFromName(kMissing, params, 2, getter_Copies(missingMessage));
   
     nsXPIDLString missingTitle;
-    sb->FormatStringFromName(NS_LITERAL_STRING("profileMissingTitle").get(),
+    sb->FormatStringFromName(MOZ_UTF16("profileMissingTitle"),
                              params, 1, getter_Copies(missingTitle));
   
     if (missingMessage && missingTitle) {
       nsCOMPtr<nsIPromptService> ps
         (do_GetService(NS_PROMPTSERVICE_CONTRACTID));
       NS_ENSURE_TRUE(ps, NS_ERROR_FAILURE);
   
       ps->Alert(nullptr, missingTitle, missingMessage);
--- a/toolkit/xre/nsNativeAppSupportOS2.cpp
+++ b/toolkit/xre/nsNativeAppSupportOS2.cpp
@@ -1367,17 +1367,17 @@ void nsNativeAppSupportOS2::ParseDDEArg(
     WinDdeQueryString( args, temp.BeginWriting(), temp.Length(), CP_WINANSI );
     // Parse out the given arg.
     ParseDDEArg(temp.get(), index, aString);
     return;
 }
 
 void nsNativeAppSupportOS2::ActivateLastWindow() {
     nsCOMPtr<nsIDOMWindow> navWin;
-    GetMostRecentWindow( NS_LITERAL_STRING("navigator:browser").get(), getter_AddRefs( navWin ) );
+    GetMostRecentWindow( MOZ_UTF16("navigator:browser"), getter_AddRefs( navWin ) );
     if ( navWin )
         // Activate that window.
         activateWindow( navWin );
     else
         // Need to create a Navigator window, then.
         OpenBrowserWindow();
 }
 
--- a/toolkit/xre/nsNativeAppSupportWin.cpp
+++ b/toolkit/xre/nsNativeAppSupportWin.cpp
@@ -1237,17 +1237,17 @@ HDDEDATA nsNativeAppSupportWin::CreateDD
                                            mApplication,
                                            CF_TEXT,
                                            0 );
     return result;
 }
 
 void nsNativeAppSupportWin::ActivateLastWindow() {
     nsCOMPtr<nsIDOMWindow> navWin;
-    GetMostRecentWindow( NS_LITERAL_STRING("navigator:browser").get(), getter_AddRefs( navWin ) );
+    GetMostRecentWindow( MOZ_UTF16("navigator:browser"), getter_AddRefs( navWin ) );
     if ( navWin ) {
         // Activate that window.
         activateWindow( navWin );
     } else {
         // Need to create a Navigator window, then.
         OpenBrowserWindow();
     }
 }
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1837,17 +1837,17 @@ void nsExternalAppHandler::SendStatusCha
               } else if (mTransfer) {
                 mTransfer->OnStatusChange(nullptr, (type == kReadError) ? aRequest : nullptr, rv, msgText);
               }
               else
               if (XRE_GetProcessType() == GeckoProcessType_Default) {
                 // We don't have a listener.  Simply show the alert ourselves.
                 nsCOMPtr<nsIPrompt> prompter(do_GetInterface(mWindowContext));
                 nsXPIDLString title;
-                bundle->FormatStringFromName(NS_LITERAL_STRING("title").get(),
+                bundle->FormatStringFromName(MOZ_UTF16("title"),
                                              strings,
                                              1,
                                              getter_Copies(title));
                 if (prompter)
                 {
                   prompter->Alert(title, msgText);
                 }
               }
--- a/uriloader/exthandler/os2/nsOSHelperAppService.cpp
+++ b/uriloader/exthandler/os2/nsOSHelperAppService.cpp
@@ -1333,17 +1333,17 @@ WpsGetDefaultHandler(const char *aFileEx
       uint32_t handle;
       // the handle may be zero if the WPS class provides the default handler
       if (NS_SUCCEEDED(rwsSvc->HandlerFromExtension(aFileExt, &handle, aDescription)))
         return handle;
     }
   }
 
   // no RWS or RWS failed to return at least a description
-  if (NS_FAILED(GetNLSString(NS_LITERAL_STRING("wpsDefaultOS2").get(),
+  if (NS_FAILED(GetNLSString(MOZ_UTF16("wpsDefaultOS2"),
                              aDescription)))
     aDescription.Assign(NS_LITERAL_STRING("WPS default"));
 
   return 0;
 }
 
 //------------------------------------------------------------------------
 
@@ -1383,17 +1383,17 @@ WpsMimeInfoFromExtension(const char *aFi
     ustr.Truncate();
 
   if (ustr.IsEmpty()) {
     nsAutoCString extUpper;
     ToUpperCase(nsDependentCString(aFileExt), extUpper);
     CopyUTF8toUTF16(extUpper, ustr);
 
     nsAutoString fileType;
-    if (NS_FAILED(GetNLSString(NS_LITERAL_STRING("fileType").get(), fileType)))
+    if (NS_FAILED(GetNLSString(MOZ_UTF16("fileType"), fileType)))
       ustr.Assign(NS_LITERAL_STRING("%S file"));
     int pos = -1;
     if ((pos = fileType.Find("%S")) > -1)
       fileType.Replace(pos, 2, ustr);
     aMI->SetDescription(fileType);
   }
 }
 
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -566,17 +566,17 @@ nsAppShell::ProcessNextNativeEvent(bool 
 
     case AndroidGeckoEvent::LOW_MEMORY:
         // TODO hook in memory-reduction stuff for different levels here
         if (curEvent->MetaState() >= AndroidGeckoEvent::MEMORY_PRESSURE_MEDIUM) {
             nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
             if (os) {
                 os->NotifyObservers(nullptr,
                                     "memory-pressure",
-                                    NS_LITERAL_STRING("low-memory").get());
+                                    MOZ_UTF16("low-memory"));
             }
         }
         break;
 
     case AndroidGeckoEvent::NETWORK_LINK_CHANGE:
     {
         nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
         if (os) {
--- a/widget/android/nsPrintOptionsAndroid.cpp
+++ b/widget/android/nsPrintOptionsAndroid.cpp
@@ -7,17 +7,17 @@
 #include "nsPrintSettingsImpl.h"
 
 class nsPrintSettingsAndroid : public nsPrintSettings {
 public:
   nsPrintSettingsAndroid()
   {
     // The aim here is to set up the objects enough that silent printing works
     SetOutputFormat(nsIPrintSettings::kOutputFormatPDF);
-    SetPrinterName(NS_LITERAL_STRING("PDF printer").get());
+    SetPrinterName(MOZ_UTF16("PDF printer"));
     
   }
 };
 
 nsPrintOptionsAndroid::nsPrintOptionsAndroid()
 {
 }
 
--- a/widget/gonk/nsWindow.cpp
+++ b/widget/gonk/nsWindow.cpp
@@ -100,17 +100,17 @@ public:
             }
         }
 
         // Notify observers that the screen state has just changed.
         nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
         if (observerService) {
           observerService->NotifyObservers(
             nullptr, "screen-state-changed",
-            mIsOn ? NS_LITERAL_STRING("on").get() : NS_LITERAL_STRING("off").get()
+            mIsOn ? MOZ_UTF16("on") : MOZ_UTF16("off")
           );
         }
 
         return NS_OK;
     }
 
 private:
     bool mIsOn;
--- a/widget/gtk/nsDeviceContextSpecG.cpp
+++ b/widget/gtk/nsDeviceContextSpecG.cpp
@@ -815,39 +815,39 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::In
     printerFeatures.SetNumOrientationRecords(2);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
 
     /* PostScript module does not support changing the plex mode... */
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetCanChangePlex(false);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
     DO_PR_DEBUG_LOG(("setting default plex to '%s'\n", "default"));
-    aPrintSettings->SetPlexName(NS_LITERAL_STRING("default").get());
+    aPrintSettings->SetPlexName(MOZ_UTF16("default"));
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetPlexRecord(0, "default");
     printerFeatures.SetNumPlexRecords(1);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
 
     /* PostScript module does not support changing the resolution mode... */
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetCanChangeResolutionName(false);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
     DO_PR_DEBUG_LOG(("setting default resolution to '%s'\n", "default"));
-    aPrintSettings->SetResolutionName(NS_LITERAL_STRING("default").get());
+    aPrintSettings->SetResolutionName(MOZ_UTF16("default"));
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetResolutionNameRecord(0, "default");
     printerFeatures.SetNumResolutionNameRecords(1);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
 
     /* PostScript module does not support changing the colorspace... */
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetCanChangeColorspace(false);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
     DO_PR_DEBUG_LOG(("setting default colorspace to '%s'\n", "default"));
-    aPrintSettings->SetColorspace(NS_LITERAL_STRING("default").get());
+    aPrintSettings->SetColorspace(MOZ_UTF16("default"));
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetColorspaceRecord(0, "default");
     printerFeatures.SetNumColorspaceRecords(1);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */   
 
 #ifdef SET_PRINTER_FEATURES_VIA_PREFS
     printerFeatures.SetCanChangePaperSize(true);
 #endif /* SET_PRINTER_FEATURES_VIA_PREFS */
--- a/widget/gtk/nsPrintDialogGTK.cpp
+++ b/widget/gtk/nsPrintDialogGTK.cpp
@@ -55,33 +55,33 @@ ShowCustomDialog(GtkComboBox *changed_bo
   GtkWindow* printDialog = GTK_WINDOW(user_data);
   nsCOMPtr<nsIStringBundleService> bundleSvc =
        do_GetService(NS_STRINGBUNDLE_CONTRACTID);
 
   nsCOMPtr<nsIStringBundle> printBundle;
   bundleSvc->CreateBundle("chrome://global/locale/printdialog.properties", getter_AddRefs(printBundle));
   nsXPIDLString intlString;
 
-  printBundle->GetStringFromName(NS_LITERAL_STRING("headerFooterCustom").get(), getter_Copies(intlString));
+  printBundle->GetStringFromName(MOZ_UTF16("headerFooterCustom"), getter_Copies(intlString));
   GtkWidget* prompt_dialog = gtk_dialog_new_with_buttons(NS_ConvertUTF16toUTF8(intlString).get(), printDialog,
 #if (MOZ_WIDGET_GTK == 2)
                                                          (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
 #else
                                                          (GtkDialogFlags)(GTK_DIALOG_MODAL),
 #endif
                                                          GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
                                                          GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
                                                          nullptr);
   gtk_dialog_set_default_response(GTK_DIALOG(prompt_dialog), GTK_RESPONSE_ACCEPT);
   gtk_dialog_set_alternative_button_order(GTK_DIALOG(prompt_dialog),
                                           GTK_RESPONSE_ACCEPT,
                                           GTK_RESPONSE_REJECT,
                                           -1);
 
-  printBundle->GetStringFromName(NS_LITERAL_STRING("customHeaderFooterPrompt").get(), getter_Copies(intlString));
+  printBundle->GetStringFromName(MOZ_UTF16("customHeaderFooterPrompt"), getter_Copies(intlString));
   GtkWidget* custom_label = gtk_label_new(NS_ConvertUTF16toUTF8(intlString).get());
   GtkWidget* custom_entry = gtk_entry_new();
   GtkWidget* question_icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
 
   // To be convenient, prefill the textbox with the existing value, if any, and select it all so they can easily
   // both edit it and type in a new one.
   const char* current_text = (const char*) g_object_get_data(G_OBJECT(changed_box), "custom-text");
   if (current_text) {
--- a/widget/gtk/nsSound.cpp
+++ b/widget/gtk/nsSound.cpp
@@ -123,17 +123,17 @@ ca_context_get_default()
     nsCOMPtr<nsIStringBundleService> bundleService =
         mozilla::services::GetStringBundleService();
     if (bundleService) {
         nsCOMPtr<nsIStringBundle> brandingBundle;
         bundleService->CreateBundle("chrome://branding/locale/brand.properties",
                                     getter_AddRefs(brandingBundle));
         if (brandingBundle) {
             nsAutoString wbrand;
-            brandingBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
+            brandingBundle->GetStringFromName(MOZ_UTF16("brandShortName"),
                                               getter_Copies(wbrand));
             NS_ConvertUTF16toUTF8 brand(wbrand);
 
             ca_context_change_props(ctx, "application.name", brand.get(),
                                     nullptr);
         }
     }
 
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3312,17 +3312,17 @@ GetBrandName(nsXPIDLString& brandName)
     nsCOMPtr<nsIStringBundle> bundle;
     if (bundleService)
         bundleService->CreateBundle(
             "chrome://branding/locale/brand.properties",
             getter_AddRefs(bundle));
 
     if (bundle)
         bundle->GetStringFromName(
-            NS_LITERAL_STRING("brandShortName").get(),
+            MOZ_UTF16("brandShortName"),
             getter_Copies(brandName));
 
     if (brandName.IsEmpty())
         brandName.Assign(NS_LITERAL_STRING("Mozilla"));
 }
 
 static GdkWindow *
 CreateGdkWindow(GdkWindow *parent, GtkWidget *widget)
--- a/widget/os2/nsRwsService.cpp
+++ b/widget/os2/nsRwsService.cpp
@@ -310,17 +310,17 @@ nsRwsService::HandlerFromPath(const char
                     RWSI_ASIS,   0, 32,
                     RWSI_ASIS,   0, (ULONG)-1);
 
       // if there's no associated program, create dummy values
       // (if chosen, the WPS will open the file's Properties notebook)
       if (rc) {
         if (rc == RWSSRV_FUNCTIONFAILED) {
           *aHandle = 0;
-          AssignNLSString(NS_LITERAL_STRING("wpsDefaultOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("wpsDefaultOS2"), _retval);
           rv = NS_OK;
         }
         else
           ERRMSG(rc, "wpQueryAssociatedProgram")
         break;
       }
 
       // get a ptr to the return value's data structure;  then get
@@ -355,58 +355,58 @@ nsRwsService::HandlerFromPath(const char
     // the default view is provided by the file's WPS class;
     // in this case, *aHandle is 0
 
     // see if it's a known view that can be given a meaningful name
     switch (defView) {
       case 0xbc2b: {
         rv = IsDescendedFrom(wpsFilePtr, "MMImage");
         if (NS_SUCCEEDED(rv))
-          AssignNLSString(NS_LITERAL_STRING("mmImageViewerOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("mmImageViewerOS2"), _retval);
         break;
       }
 
       case 0xbc0d:    // Audio editor
       case 0xbc21:    // Video editor
       case 0xbc17:    // Midi editor
       case 0xbbef:    // Play
       case 0xbbe5: {  // Player
         rv = IsDescendedFrom(wpsFilePtr, "MMAudio");
         if (NS_SUCCEEDED(rv)) {
-          AssignNLSString(NS_LITERAL_STRING("mmAudioPlayerOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("mmAudioPlayerOS2"), _retval);
           break;
         }
 
         rv = IsDescendedFrom(wpsFilePtr, "MMVideo");
         if (NS_SUCCEEDED(rv)) {
-          AssignNLSString(NS_LITERAL_STRING("mmVideoPlayerOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("mmVideoPlayerOS2"), _retval);
           break;
         }
 
         rv = IsDescendedFrom(wpsFilePtr, "MMMIDI");
         if (NS_SUCCEEDED(rv))
-          AssignNLSString(NS_LITERAL_STRING("mmMidiPlayerOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("mmMidiPlayerOS2"), _retval);
 
         break;
       }
 
       case 0x7701: {
         rv = IsDescendedFrom(wpsFilePtr, "TSArcMgr");
         if (NS_SUCCEEDED(rv))
-          AssignNLSString(NS_LITERAL_STRING("odZipFolderOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("odZipFolderOS2"), _retval);
         break;
       }
 
       // this has to go last because TSEnhDataFile replaces
       // WPDataFile; if present, all data files are descended from it
       case 0xb742:
       case 0xa742: {
         rv = IsDescendedFrom(wpsFilePtr, "TSEnhDataFile");
         if (NS_SUCCEEDED(rv))
-          AssignNLSString(NS_LITERAL_STRING("odTextViewOS2").get(), _retval);
+          AssignNLSString(MOZ_UTF16("odTextViewOS2"), _retval);
         break;
       }
     } // end switch
 
     if (NS_SUCCEEDED(rv))
       break;
 
     // the name of this view is unknown, so create a generic name
@@ -426,17 +426,17 @@ nsRwsService::HandlerFromPath(const char
     nsAutoChar16Buffer buffer;
     int32_t bufLength;
     rv = MultiByteToWideChar(0, pszTitle, strlen(pszTitle),
                              buffer, bufLength);
     if (NS_FAILED(rv))
       break;
 
     nsAutoString classViewer;
-    AssignNLSString(NS_LITERAL_STRING("classViewerOS2").get(), classViewer);
+    AssignNLSString(MOZ_UTF16("classViewerOS2"), classViewer);
     int pos = -1;
     if ((pos = classViewer.Find("%S")) > -1)
       classViewer.Replace(pos, 2, buffer.Elements());
     _retval.Assign(classViewer);
     rv = NS_OK;
   } while (0);
 
   // free the pHdr allocated by the final call
@@ -742,17 +742,17 @@ static void AssignNLSString(const PRUnic
       "chrome://mozapps/locale/downloads/unknownContentType.properties",
       getter_AddRefs(bundle));
     if (NS_FAILED(rv))
       break;
 
     // if we can't fetch the requested string, try to get "WPS Default"
     rv = bundle->GetStringFromName(aKey, getter_Copies(title));
     if (NS_FAILED(rv))
-      rv = bundle->GetStringFromName(NS_LITERAL_STRING("wpsDefaultOS2").get(),
+      rv = bundle->GetStringFromName(MOZ_UTF16("wpsDefaultOS2"),
                                      getter_Copies(title));
   } while (0);
 
   if (NS_SUCCEEDED(rv))
     result.Assign(title);
   else
     result.Assign(NS_LITERAL_STRING("WPS Default"));
 }
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -2152,17 +2152,17 @@ GetBrandName(nsXPIDLString& brandName)
     nsCOMPtr<nsIStringBundle> bundle;
     if (bundleService)
         bundleService->CreateBundle(
             "chrome://branding/locale/brand.properties",
             getter_AddRefs(bundle));
 
     if (bundle)
         bundle->GetStringFromName(
-            NS_LITERAL_STRING("brandShortName").get(),
+            MOZ_UTF16("brandShortName"),
             getter_Copies(brandName));
 
     if (brandName.IsEmpty())
         brandName.Assign(NS_LITERAL_STRING("Mozilla"));
 }
 
 
 nsresult
--- a/widget/windows/AudioSession.cpp
+++ b/widget/windows/AudioSession.cpp
@@ -202,17 +202,17 @@ AudioSession::Start()
     nsCOMPtr<nsIStringBundleService> bundleService = 
       do_GetService(NS_STRINGBUNDLE_CONTRACTID);
     NS_ENSURE_TRUE(bundleService, NS_ERROR_FAILURE);
     nsCOMPtr<nsIStringBundle> bundle;
     bundleService->CreateBundle("chrome://branding/locale/brand.properties",
                                 getter_AddRefs(bundle));
     NS_ENSURE_TRUE(bundle, NS_ERROR_FAILURE);
 
-    bundle->GetStringFromName(NS_LITERAL_STRING("brandFullName").get(),
+    bundle->GetStringFromName(MOZ_UTF16("brandFullName"),
                               getter_Copies(mDisplayName));
 
     wchar_t *buffer;
     mIconPath.GetMutableData(&buffer, MAX_PATH);
 
     // XXXkhuey we should provide a way for a xulrunner app to specify an icon
     // that's not in the product binary.
     ::GetModuleFileNameW(nullptr, buffer, MAX_PATH);
--- a/widget/windows/nsDataObj.cpp
+++ b/widget/windows/nsDataObj.cpp
@@ -1025,17 +1025,17 @@ nsDataObj :: GetFileDescriptorInternetSh
     return E_OUTOFMEMORY;
   }
 
   // get a valid filename in the following order: 1) from the page title, 
   // 2) localized string for an untitled page, 3) just use "Untitled.URL"
   if (!CreateFilenameFromTextA(title, ".URL", 
                                fileGroupDescA->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
     nsXPIDLString untitled;
-    if (!GetLocalizedString(NS_LITERAL_STRING("noPageTitle").get(), untitled) ||
+    if (!GetLocalizedString(MOZ_UTF16("noPageTitle"), untitled) ||
         !CreateFilenameFromTextA(untitled, ".URL", 
                                  fileGroupDescA->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
       strcpy(fileGroupDescA->fgd[0].cFileName, "Untitled.URL");
     }
   }
 
   // one file in the file block
   fileGroupDescA->cItems = 1;
@@ -1063,23 +1063,23 @@ nsDataObj :: GetFileDescriptorInternetSh
   LPFILEGROUPDESCRIPTORW fileGroupDescW = reinterpret_cast<LPFILEGROUPDESCRIPTORW>(::GlobalLock(fileGroupDescHandle));
   if (!fileGroupDescW) {
     ::GlobalFree(fileGroupDescHandle);
     return E_OUTOFMEMORY;
   }
 
   // get a valid filename in the following order: 1) from the page title, 
   // 2) localized string for an untitled page, 3) just use "Untitled.URL"
-  if (!CreateFilenameFromTextW(title, NS_LITERAL_STRING(".URL").get(), 
+  if (!CreateFilenameFromTextW(title, MOZ_UTF16(".URL"), 
                                fileGroupDescW->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
     nsXPIDLString untitled;
-    if (!GetLocalizedString(NS_LITERAL_STRING("noPageTitle").get(), untitled) ||
-        !CreateFilenameFromTextW(untitled, NS_LITERAL_STRING(".URL").get(), 
+    if (!GetLocalizedString(MOZ_UTF16("noPageTitle"), untitled) ||
+        !CreateFilenameFromTextW(untitled, MOZ_UTF16(".URL"), 
                                  fileGroupDescW->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
-      wcscpy(fileGroupDescW->fgd[0].cFileName, NS_LITERAL_STRING("Untitled.URL").get());
+      wcscpy(fileGroupDescW->fgd[0].cFileName, MOZ_UTF16("Untitled.URL"));
     }
   }
 
   // one file in the file block
   fileGroupDescW->cItems = 1;
   fileGroupDescW->fgd[0].dwFlags = FD_LINKUI;
 
   ::GlobalUnlock( fileGroupDescHandle );
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -255,17 +255,17 @@ GetFileNameForPrintSettings(nsIPrintSett
     mozilla::services::GetStringBundleService();
   if (!bundleService)
     return NS_ERROR_FAILURE;
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle(NS_ERROR_GFX_PRINTER_BUNDLE_URL, getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsXPIDLString title;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("PrintToFile").get(), getter_Copies(title));
+  rv = bundle->GetStringFromName(MOZ_UTF16("PrintToFile"), getter_Copies(title));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIWindowWatcher> wwatch =
     (do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMWindow> window;
   wwatch->GetActiveWindow(getter_AddRefs(window));
--- a/widget/windows/nsTextStore.cpp
+++ b/widget/windows/nsTextStore.cpp
@@ -3342,17 +3342,17 @@ nsTextStore::Initialize(void)
         MarkContextAsKeyboardDisabled(sTsfDisabledContext);
         MarkContextAsEmpty(sTsfDisabledContext);
       }
     }
   }
 
   if (sTsfThreadMgr && !sFlushTIPInputMessage) {
     sFlushTIPInputMessage = ::RegisterWindowMessageW(
-        NS_LITERAL_STRING("Flush TIP Input Message").get());
+        MOZ_UTF16("Flush TIP Input Message"));
   }
 
   if (!sTsfThreadMgr) {
     NS_IF_RELEASE(sMessagePump);
     NS_IF_RELEASE(sKeystrokeMgr);
   }
 
   PR_LOG(sTextStoreLog, PR_LOG_ALWAYS,
--- a/widget/windows/winrt/MetroContracts.cpp
+++ b/widget/windows/winrt/MetroContracts.cpp
@@ -411,17 +411,17 @@ FrameworkView::OnDataShareRequested(IDat
     do_GetService(NS_STRINGBUNDLE_CONTRACTID);
   NS_ENSURE_TRUE(bundleService, E_FAIL);
   nsCOMPtr<nsIStringBundle> brandBundle;
   nsString brandName;
   bundleService->CreateBundle("chrome://branding/locale/brand.properties",
     getter_AddRefs(brandBundle));
   NS_ENSURE_TRUE(brandBundle, E_FAIL);
   if(brandBundle) {
-    brandBundle->GetStringFromName(NS_LITERAL_STRING("brandFullName").get(),
+    brandBundle->GetStringFromName(MOZ_UTF16("brandFullName"),
                                    getter_Copies(brandName));
   }
 
   // Set these properties at the end.  Otherwise users can get a
   // "There was a problem with the data package" error when there
   // is simply nothing to share.
   props->put_ApplicationName(HStringReference(brandName.BeginReading()).Get());
   if (title.Length()) {
--- a/widget/xpwidgets/nsBaseFilePicker.cpp
+++ b/widget/xpwidgets/nsBaseFilePicker.cpp
@@ -166,57 +166,57 @@ nsBaseFilePicker::AppendFilters(int32_t 
   rv = stringService->CreateBundle(FILEPICKER_FILTERS, getter_AddRefs(filterBundle));
   if (NS_FAILED(rv))
     return NS_ERROR_FAILURE;
 
   nsXPIDLString title;
   nsXPIDLString filter;
 
   if (aFilterMask & filterAll) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("allTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("allFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("allTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("allFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterHTML) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("htmlTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("htmlFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("htmlTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("htmlFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterText) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("textTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("textFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("textTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("textFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterImages) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("imageTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("imageFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("imageTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("imageFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterAudio) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("audioTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("audioFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("audioTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("audioFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterVideo) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("videoTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("videoFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("videoTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("videoFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterXML) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("xmlTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("xmlFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("xmlTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("xmlFilter"), getter_Copies(filter));
     AppendFilter(title,filter);
   }
   if (aFilterMask & filterXUL) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("xulTitle").get(), getter_Copies(title));
-    filterBundle->GetStringFromName(NS_LITERAL_STRING("xulFilter").get(), getter_Copies(filter));
+    titleBundle->GetStringFromName(MOZ_UTF16("xulTitle"), getter_Copies(title));
+    filterBundle->GetStringFromName(MOZ_UTF16("xulFilter"), getter_Copies(filter));
     AppendFilter(title, filter);
   }
   if (aFilterMask & filterApps) {
-    titleBundle->GetStringFromName(NS_LITERAL_STRING("appsTitle").get(), getter_Copies(title));
+    titleBundle->GetStringFromName(MOZ_UTF16("appsTitle"), getter_Copies(title));
     // Pass the magic string "..apps" to the platform filepicker, which it
     // should recognize and do the correct platform behavior for.
     AppendFilter(title, NS_LITERAL_STRING("..apps"));
   }
   return NS_OK;
 }
 
 // Set the filter index
--- a/xpcom/base/nsMemoryImpl.cpp
+++ b/xpcom/base/nsMemoryImpl.cpp
@@ -43,17 +43,17 @@ NS_IMETHODIMP_(void)
 nsMemoryImpl::Free(void* ptr)
 {
     NS_Free(ptr);
 }
 
 NS_IMETHODIMP
 nsMemoryImpl::HeapMinimize(bool aImmediate)
 {
-    return FlushMemory(NS_LITERAL_STRING("heap-minimize").get(), aImmediate);
+    return FlushMemory(MOZ_UTF16("heap-minimize"), aImmediate);
 }
 
 NS_IMETHODIMP
 nsMemoryImpl::IsLowMemory(bool *result)
 {
     NS_ERROR("IsLowMemory is deprecated.  See bug 592308.");
     *result = false;
     return NS_OK;
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -1623,25 +1623,25 @@ public:
 
     nsCOMPtr<nsIObserverService> os = services::GetObserverService();
     if (!os) {
       return NS_ERROR_FAILURE;
     }
 
     if (mRemainingIters == 0) {
       os->NotifyObservers(nullptr, "after-minimize-memory-usage",
-                          NS_LITERAL_STRING("MinimizeMemoryUsageRunnable").get());
+                          MOZ_UTF16("MinimizeMemoryUsageRunnable"));
       if (mCallback) {
         mCallback->Run();
       }
       return NS_OK;
     }
 
     os->NotifyObservers(nullptr, "memory-pressure",
-                        NS_LITERAL_STRING("heap-minimize").get());
+                        MOZ_UTF16("heap-minimize"));
     mRemainingIters--;
     NS_DispatchToMainThread(this);
 
     return NS_OK;
   }
 
   NS_IMETHOD Cancel()
   {
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -447,30 +447,30 @@ ParseManifest(NSLocationType type, FileL
       }
     }
   }
 
   nsAutoString osVersion;
 #if defined(XP_WIN)
   OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
   if (GetVersionEx(&info)) {
-    nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
+    nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
                                          info.dwMajorVersion,
                                          info.dwMinorVersion);
   }
 #elif defined(MOZ_WIDGET_COCOA)
   SInt32 majorVersion, minorVersion;
   if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
       (Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
-    nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
+    nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
                                          majorVersion,
                                          minorVersion);
   }
 #elif defined(MOZ_WIDGET_GTK)
-  nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
+  nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
                                        gtk_major_version,
                                        gtk_minor_version);
 #elif defined(MOZ_WIDGET_ANDROID)
   bool isTablet = false;
   if (mozilla::AndroidBridge::Bridge()) {
     mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
     isTablet = mozilla::widget::android::GeckoAppShell::IsTablet();
   }
--- a/xpcom/tests/TestObserverService.cpp
+++ b/xpcom/tests/TestObserverService.cpp
@@ -94,23 +94,23 @@ int main(int argc, char *argv[])
  
         printf("Adding Observer-B as observer of topic-B...\n");
         rv = anObserverService->AddObserver(bObserver, topicB.get(), false);
         testResult(rv);
 
         printf("Testing Notify(observer-A, topic-A)...\n");
         rv = anObserverService->NotifyObservers( aObserver,
                                    topicA.get(),
-                                   NS_LITERAL_STRING("Testing Notify(observer-A, topic-A)").get() );
+                                   MOZ_UTF16("Testing Notify(observer-A, topic-A)") );
         testResult(rv);
 
         printf("Testing Notify(observer-B, topic-B)...\n");
         rv = anObserverService->NotifyObservers( bObserver,
                                    topicB.get(),
-                                   NS_LITERAL_STRING("Testing Notify(observer-B, topic-B)").get() );
+                                   MOZ_UTF16("Testing Notify(observer-B, topic-B)") );
         testResult(rv);
  
         printf("Testing EnumerateObserverList (for topic-A)...\n");
         nsCOMPtr<nsISimpleEnumerator> e;
         rv = anObserverService->EnumerateObservers(topicA.get(), getter_AddRefs(e));
 
         testResult(rv);
 
@@ -122,17 +122,17 @@ int main(int argc, char *argv[])
           {
               e->GetNext(getter_AddRefs(observer));
               printf("Calling observe on enumerated observer ");
               printString(reinterpret_cast<TestObserver*>
                                           (reinterpret_cast<void*>(observer.get()))->mName);
               printf("...\n");
               rv = observer->Observe( observer, 
                                       topicA.get(), 
-                                      NS_LITERAL_STRING("during enumeration").get() );
+                                      MOZ_UTF16("during enumeration") );
               testResult(rv);
           }
         }
         printf("...done enumerating observers of topic-A\n");
 
         printf("Removing Observer-A...\n");
         rv = anObserverService->RemoveObserver(aObserver, topicA.get());
         testResult(rv);
--- a/xpcom/tests/TestStrings.cpp
+++ b/xpcom/tests/TestStrings.cpp
@@ -1012,33 +1012,33 @@ static bool test_strip_chars_helper(cons
   nsAutoString tmp(str);
   nsAString& data = tmp;
   data.StripChars(strip, offset);
   return data.Equals(result);
 }
 
 static bool test_strip_chars()
 {
-  return test_strip_chars_helper(NS_LITERAL_STRING("foo \r \nbar").get(),
-                                 NS_LITERAL_STRING(" \n\r").get(),
+  return test_strip_chars_helper(MOZ_UTF16("foo \r \nbar"),
+                                 MOZ_UTF16(" \n\r"),
                                  NS_LITERAL_STRING("foobar")) &&
-         test_strip_chars_helper(NS_LITERAL_STRING("\r\nfoo\r\n").get(),
-                                 NS_LITERAL_STRING(" \n\r").get(),
+         test_strip_chars_helper(MOZ_UTF16("\r\nfoo\r\n"),
+                                 MOZ_UTF16(" \n\r"),
                                  NS_LITERAL_STRING("foo")) &&
-         test_strip_chars_helper(NS_LITERAL_STRING("foo").get(),
-                                 NS_LITERAL_STRING(" \n\r").get(),
+         test_strip_chars_helper(MOZ_UTF16("foo"),
+                                 MOZ_UTF16(" \n\r"),
                                  NS_LITERAL_STRING("foo")) &&
-         test_strip_chars_helper(NS_LITERAL_STRING("foo").get(),
-                                 NS_LITERAL_STRING("fo").get(),
+         test_strip_chars_helper(MOZ_UTF16("foo"),
+                                 MOZ_UTF16("fo"),
                                  NS_LITERAL_STRING("")) &&
-         test_strip_chars_helper(NS_LITERAL_STRING("foo").get(),
-                                 NS_LITERAL_STRING("foo").get(),
+         test_strip_chars_helper(MOZ_UTF16("foo"),
+                                 MOZ_UTF16("foo"),
                                  NS_LITERAL_STRING("")) &&
-         test_strip_chars_helper(NS_LITERAL_STRING(" foo").get(),
-                                 NS_LITERAL_STRING(" ").get(),
+         test_strip_chars_helper(MOZ_UTF16(" foo"),
+                                 MOZ_UTF16(" "),
                                  NS_LITERAL_STRING(" foo"), 1);
 }
 
 static bool test_huge_capacity()
 {
   nsString a, b, c, d, e, f, g, h, i, j, k, l, m, n;
   nsCString n1;
   bool fail = false;
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -456,26 +456,26 @@ nsHTTPIndex::OnIndexAvailable(nsIRequest
         rv = Assert(entry, kNC_LastModified, val, true);
       }
 
       // filetype
       uint32_t type;
       rv = aIndex->GetType(&type);
       switch (type) {
       case nsIDirIndex::TYPE_UNKNOWN:
-        rv = mDirRDF->GetLiteral(NS_LITERAL_STRING("UNKNOWN").get(), getter_AddRefs(lit));
+        rv = mDirRDF->GetLiteral(MOZ_UTF16("UNKNOWN"), getter_AddRefs(lit));
         break;
       case nsIDirIndex::TYPE_DIRECTORY:
-        rv = mDirRDF->GetLiteral(NS_LITERAL_STRING("DIRECTORY").get(), getter_AddRefs(lit));
+        rv = mDirRDF->GetLiteral(MOZ_UTF16("DIRECTORY"), getter_AddRefs(lit));
         break;
       case nsIDirIndex::TYPE_FILE:
-        rv = mDirRDF->GetLiteral(NS_LITERAL_STRING("FILE").get(), getter_AddRefs(lit));
+        rv = mDirRDF->GetLiteral(MOZ_UTF16("FILE"), getter_AddRefs(lit));
         break;
       case nsIDirIndex::TYPE_SYMLINK:
-        rv = mDirRDF->GetLiteral(NS_LITERAL_STRING("SYMLINK").get(), getter_AddRefs(lit));
+        rv = mDirRDF->GetLiteral(MOZ_UTF16("SYMLINK"), getter_AddRefs(lit));
         break;
       }
       
       if (NS_FAILED(rv)) return rv;
       rv = Assert(entry, kNC_FileType, lit, true);
       if (NS_FAILED(rv)) return rv;
     }
 
@@ -583,19 +583,19 @@ nsHTTPIndex::CommonInit()
                          getter_AddRefs(kNC_LastModified));
     mDirRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "Content-Type"),
                          getter_AddRefs(kNC_ContentType));
     mDirRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "File-Type"),
                          getter_AddRefs(kNC_FileType));
     mDirRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "IsContainer"),
                          getter_AddRefs(kNC_IsContainer));
 
-    rv = mDirRDF->GetLiteral(NS_LITERAL_STRING("true").get(), getter_AddRefs(kTrueLiteral));
+    rv = mDirRDF->GetLiteral(MOZ_UTF16("true"), getter_AddRefs(kTrueLiteral));
     if (NS_FAILED(rv)) return(rv);
-    rv = mDirRDF->GetLiteral(NS_LITERAL_STRING("false").get(), getter_AddRefs(kFalseLiteral));
+    rv = mDirRDF->GetLiteral(MOZ_UTF16("false"), getter_AddRefs(kFalseLiteral));
     if (NS_FAILED(rv)) return(rv);
 
     rv = NS_NewISupportsArray(getter_AddRefs(mConnectionList));
     if (NS_FAILED(rv)) return(rv);
 
     // note: don't register DS here
     return rv;
 }