Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 16 Aug 2017 13:58:35 +1000
changeset 424848 822d7f1bc602f84332b13e258738aa3b95700691
parent 424847 0cf94aae28707b28ff1fdd27448843af23136e0d
child 424849 6a65de867d0011c87d7e14b0fa3c2b1cf74e662d
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1390428
milestone57.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 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm. These are all easy cases where an nsXPIDLCString local variable is set via getter_Copies() and then is only used in ways that nsCStrings can also be used (i.e. no null checks or implicit conversions to |char*|). In every case the patch trivially replaces the nsXPIDLCString with an nsCString. (Also, there are a couple of unused nsXPIDLCString variables that the patch simply removes.)
chrome/nsChromeRegistry.cpp
chrome/nsChromeRegistryChrome.cpp
dom/base/nsContentAreaDragDrop.cpp
dom/base/nsCopySupport.cpp
dom/base/nsGlobalWindowCommands.cpp
dom/html/ImageDocument.cpp
dom/html/nsHTMLDocument.cpp
dom/ipc/ContentChild.cpp
dom/svg/SVGDocument.cpp
dom/xslt/xslt/txStylesheetCompiler.cpp
editor/composer/nsComposerCommands.cpp
editor/composer/nsComposerDocumentCommands.cpp
extensions/auth/nsAuthGSSAPI.cpp
extensions/pref/autoconfig/src/nsAutoConfig.cpp
intl/strres/nsStringBundle.cpp
js/xpconnect/src/XPCWrappedNativeInfo.cpp
layout/base/nsStyleSheetService.cpp
modules/libpref/Preferences.cpp
modules/libpref/nsPrefBranch.cpp
netwerk/base/nsChannelClassifier.cpp
netwerk/base/nsProtocolProxyService.cpp
netwerk/cache2/OldWrappers.cpp
netwerk/dns/nsIDNService.cpp
netwerk/mime/nsMIMEHeaderParamImpl.cpp
netwerk/protocol/http/Http2Session.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/nsHttp.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
security/manager/ssl/nsNSSCertificate.cpp
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
toolkit/xre/nsAppRunner.cpp
uriloader/base/nsURILoader.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
widget/cocoa/nsClipboard.mm
widget/cocoa/nsDragService.mm
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/chrome/nsChromeRegistry.cpp
+++ b/chrome/nsChromeRegistry.cpp
@@ -651,17 +651,17 @@ nsChromeRegistry::GetDirectionForLocale(
   // set, check the same preference but with just the first two characters of
   // the locale. If that isn't set, default to left-to-right.
   nsAutoCString prefString = NS_LITERAL_CSTRING("intl.uidirection.") + aLocale;
   nsCOMPtr<nsIPrefBranch> prefBranch (do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (!prefBranch) {
     return false;
   }
 
-  nsXPIDLCString dir;
+  nsCString dir;
   prefBranch->GetCharPref(prefString.get(), getter_Copies(dir));
   if (dir.IsEmpty()) {
     int32_t hyphen = prefString.FindChar('-');
     if (hyphen >= 1) {
       nsAutoCString shortPref(Substring(prefString, 0, hyphen));
       prefBranch->GetCharPref(shortPref.get(), getter_Copies(dir));
     }
   }
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -123,17 +123,17 @@ nsChromeRegistryChrome::Init()
     } else {
       prefs = do_QueryInterface(prefserv);
     }
   }
 
   if (!prefs) {
     NS_WARNING("Could not get pref service!");
   } else {
-    nsXPIDLCString provider;
+    nsCString provider;
     rv = prefs->GetCharPref(SELECTED_SKIN_PREF, getter_Copies(provider));
     if (NS_SUCCEEDED(rv))
       mSelectedSkin = provider;
 
     rv = prefs->AddObserver(SELECTED_SKIN_PREF, this, true);
   }
 
   nsCOMPtr<nsIObserverService> obsService = mozilla::services::GetObserverService();
@@ -270,17 +270,17 @@ nsChromeRegistryChrome::Observe(nsISuppo
 
   if (!strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic)) {
     nsCOMPtr<nsIPrefBranch> prefs (do_QueryInterface(aSubject));
     NS_ASSERTION(prefs, "Bad observer call!");
 
     NS_ConvertUTF16toUTF8 pref(someData);
 
     if (pref.EqualsLiteral(SELECTED_SKIN_PREF)) {
-      nsXPIDLCString provider;
+      nsCString provider;
       rv = prefs->GetCharPref(pref.get(), getter_Copies(provider));
       if (NS_FAILED(rv)) {
         NS_ERROR("Couldn't get new skin pref!");
         return rv;
       }
 
       mSelectedSkin = provider;
       RefreshSkins();
--- a/dom/base/nsContentAreaDragDrop.cpp
+++ b/dom/base/nsContentAreaDragDrop.cpp
@@ -575,17 +575,17 @@ DragDataProducer::Produce(DataTransfer* 
           imgRequest->GetURI(getter_AddRefs(imgUri));
 
           nsCOMPtr<nsIURL> imgUrl(do_QueryInterface(imgUri));
 
           if (imgUrl) {
             nsAutoCString extension;
             imgUrl->GetFileExtension(extension);
 
-            nsXPIDLCString mimeType;
+            nsCString mimeType;
             imgRequest->GetMimeType(getter_Copies(mimeType));
 
             nsCOMPtr<nsIMIMEInfo> mimeInfo;
             mimeService->GetFromTypeAndExtension(mimeType, EmptyCString(),
                                                  getter_AddRefs(mimeInfo));
 
             if (mimeInfo) {
               nsAutoCString spec;
--- a/dom/base/nsCopySupport.cpp
+++ b/dom/base/nsCopySupport.cpp
@@ -623,17 +623,17 @@ static nsresult AppendImagePromise(nsITr
 
   nsCOMPtr<nsIURL> imgUrl = do_QueryInterface(imgUri);
   NS_ENSURE_TRUE(imgUrl, NS_OK);
 
   nsAutoCString extension;
   rv = imgUrl->GetFileExtension(extension);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsXPIDLCString mimeType;
+  nsCString mimeType;
   rv = aImgRequest->GetMimeType(getter_Copies(mimeType));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMIMEInfo> mimeInfo;
   mimeService->GetFromTypeAndExtension(mimeType, EmptyCString(),
                                        getter_AddRefs(mimeInfo));
   NS_ENSURE_TRUE(mimeInfo, NS_OK);
 
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -778,17 +778,17 @@ nsClipboardGetContentsCommand::IsClipboa
 
 nsresult
 nsClipboardGetContentsCommand::DoClipboardCommand(const char *aCommandName, nsIContentViewerEdit* aEdit, nsICommandParams* aParams)
 {
   NS_ENSURE_ARG(aParams);
 
   nsAutoCString mimeType("text/plain");
 
-  nsXPIDLCString format;    // nsICommandParams needs to use nsACString
+  nsCString format;    // nsICommandParams needs to use nsACString
   if (NS_SUCCEEDED(aParams->GetCStringValue("format", getter_Copies(format))))
     mimeType.Assign(format);
 
   bool selectionOnly = false;
   aParams->GetBooleanValue("selection_only", &selectionOnly);
 
   nsAutoString contents;
   nsresult rv = aEdit->GetContents(mimeType.get(), selectionOnly, contents);
--- a/dom/html/ImageDocument.cpp
+++ b/dom/html/ImageDocument.cpp
@@ -772,23 +772,23 @@ ImageDocument::UpdateTitleAndCharset()
   nsCOMPtr<imgIRequest> imageRequest;
   nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mImageContent);
   if (imageLoader) {
     imageLoader->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
                             getter_AddRefs(imageRequest));
   }
 
   if (imageRequest) {
-    nsXPIDLCString mimeType;
+    nsCString mimeType;
     imageRequest->GetMimeType(getter_Copies(mimeType));
     ToUpperCase(mimeType);
-    nsXPIDLCString::const_iterator start, end;
+    nsCString::const_iterator start, end;
     mimeType.BeginReading(start);
     mimeType.EndReading(end);
-    nsXPIDLCString::const_iterator iter = end;
+    nsCString::const_iterator iter = end;
     if (FindInReadable(NS_LITERAL_CSTRING("IMAGE/"), start, iter) &&
         iter != end) {
       // strip out "X-" if any
       if (*iter == 'X') {
         ++iter;
         if (iter != end && *iter == '-') {
           ++iter;
           if (iter == end) {
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1366,17 +1366,17 @@ nsHTMLDocument::GetCookie(nsAString& aCo
     nsCOMPtr<nsIChannel> channel(mChannel);
     if (!channel) {
       channel = CreateDummyChannelForCookies(codebaseURI);
       if (!channel) {
         return;
       }
     }
 
-    nsXPIDLCString cookie;
+    nsCString cookie;
     service->GetCookieString(codebaseURI, channel, getter_Copies(cookie));
     // CopyUTF8toUTF16 doesn't handle error
     // because it assumes that the input is valid.
     UTF_8_ENCODING->DecodeWithoutBOMHandling(cookie, aCookie);
   }
 }
 
 NS_IMETHODIMP
@@ -3663,17 +3663,17 @@ nsHTMLDocument::QueryCommandValue(const 
   if (rv.Failed()) {
     return;
   }
 
   // If command does not have a state_attribute value, this call fails, and
   // aValue will wind up being the empty string.  This is fine -- we want to
   // return "" in that case anyway (bug 738385), so we just return NS_OK
   // regardless.
-  nsXPIDLCString cStringResult;
+  nsCString cStringResult;
   cmdParams->GetCStringValue("state_attribute",
                              getter_Copies(cStringResult));
   CopyUTF8toUTF16(cStringResult, aValue);
 }
 
 nsresult
 nsHTMLDocument::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                       bool aPreallocateChildren) const
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -427,17 +427,17 @@ ConsoleListener::Observe(nsIConsoleMessa
 {
   if (!mChild) {
     return NS_OK;
   }
 
   nsCOMPtr<nsIScriptError> scriptError = do_QueryInterface(aMessage);
   if (scriptError) {
     nsAutoString msg, sourceName, sourceLine;
-    nsXPIDLCString category;
+    nsCString category;
     uint32_t lineNum, colNum, flags;
 
     nsresult rv = scriptError->GetErrorMessage(msg);
     NS_ENSURE_SUCCESS(rv, rv);
     TruncateString(msg);
     rv = scriptError->GetSourceName(sourceName);
     NS_ENSURE_SUCCESS(rv, rv);
     TruncateString(sourceName);
--- a/dom/svg/SVGDocument.cpp
+++ b/dom/svg/SVGDocument.cpp
@@ -110,17 +110,17 @@ SVGDocument::EnsureNonSVGUserAgentStyleS
 
           nsCOMPtr<nsISupportsCString> icStr = do_QueryInterface(sheet);
           MOZ_ASSERT(icStr,
                      "category manager entries must be nsISupportsCStrings");
 
           nsAutoCString name;
           icStr->GetData(name);
 
-          nsXPIDLCString spec;
+          nsCString spec;
           catMan->GetCategoryEntry("agent-style-sheets", name.get(),
                                    getter_Copies(spec));
 
           mozilla::css::Loader* cssLoader = CSSLoader();
           if (cssLoader->GetEnabled()) {
             nsCOMPtr<nsIURI> uri;
             NS_NewURI(getter_AddRefs(uri), spec);
             if (uri) {
--- a/dom/xslt/xslt/txStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txStylesheetCompiler.cpp
@@ -1037,17 +1037,17 @@ findFunction(nsIAtom* aName, int32_t aNa
         nsCOMPtr<nsICategoryManager> catman =
             do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
 
         nsAutoString namespaceURI;
         rv = txNamespaceManager::getNamespaceURI(aNamespaceID, namespaceURI);
         NS_ENSURE_SUCCESS(rv, rv);
 
-        nsXPIDLCString contractID;
+        nsCString contractID;
         rv = catman->GetCategoryEntry("XSLT-extension-functions",
                                       NS_ConvertUTF16toUTF8(namespaceURI).get(),
                                       getter_Copies(contractID));
         if (rv == NS_ERROR_NOT_AVAILABLE) {
             return NS_ERROR_XPATH_UNKNOWN_FUNCTION;
         }
         NS_ENSURE_SUCCESS(rv, rv);
 
--- a/editor/composer/nsComposerCommands.cpp
+++ b/editor/composer/nsComposerCommands.cpp
@@ -622,17 +622,17 @@ nsMultiStateCommand::DoCommandParams(con
   }
   mozilla::HTMLEditor* htmlEditor = editor->AsHTMLEditor();
   if (NS_WARN_IF(!htmlEditor)) {
     return NS_ERROR_FAILURE;
   }
 
   nsAutoString tString;
   if (aParams) {
-    nsXPIDLCString s;
+    nsCString s;
     nsresult rv = aParams->GetCStringValue(STATE_ATTRIBUTE, getter_Copies(s));
     if (NS_SUCCEEDED(rv))
       CopyASCIItoUTF16(s, tString);
     else
       aParams->GetStringValue(STATE_ATTRIBUTE, tString);
   }
   return SetState(htmlEditor, tString);
 }
@@ -1503,17 +1503,17 @@ nsInsertTagCommand::DoCommandParams(cons
     return NS_ERROR_FAILURE;
   }
   mozilla::HTMLEditor* htmlEditor = editor->AsHTMLEditor();
   if (NS_WARN_IF(!htmlEditor)) {
     return NS_ERROR_FAILURE;
   }
 
   // do we have an href to use for creating link?
-  nsXPIDLCString s;
+  nsCString s;
   nsresult rv = aParams->GetCStringValue(STATE_ATTRIBUTE, getter_Copies(s));
   NS_ENSURE_SUCCESS(rv, rv);
   nsAutoString attrib;
   CopyASCIItoUTF16(s, attrib);
 
   if (attrib.IsEmpty())
     return NS_ERROR_INVALID_ARG;
 
--- a/editor/composer/nsComposerDocumentCommands.cpp
+++ b/editor/composer/nsComposerDocumentCommands.cpp
@@ -270,17 +270,17 @@ nsSetDocumentStateCommand::DoCommandPara
     if (NS_WARN_IF(!aParams)) {
       return NS_ERROR_NULL_POINTER;
     }
     HTMLEditor* htmlEditor = textEditor->AsHTMLEditor();
     if (NS_WARN_IF(!htmlEditor)) {
       return NS_ERROR_INVALID_ARG;
     }
 
-    nsXPIDLCString newValue;
+    nsCString newValue;
     nsresult rv = aParams->GetCStringValue(STATE_ATTRIBUTE,
                                            getter_Copies(newValue));
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
 
     if (newValue.LowerCaseEqualsLiteral("div")) {
       htmlEditor->SetDefaultParagraphSeparator(ParagraphSeparator::div);
--- a/extensions/auth/nsAuthGSSAPI.cpp
+++ b/extensions/auth/nsAuthGSSAPI.cpp
@@ -97,17 +97,17 @@ static PRLibrary* gssLibrary = nullptr;
 static PRFuncPtr KLCacheHasValidTicketsPtr;
 #define KLCacheHasValidTickets_ptr \
         ((KLCacheHasValidTickets_type)*KLCacheHasValidTicketsPtr)
 #endif
 
 static nsresult
 gssInit()
 {
-    nsXPIDLCString libPath;
+    nsCString libPath;
     nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
     if (prefs) {
         prefs->GetCharPref(kNegotiateAuthGssLib, getter_Copies(libPath));
         prefs->GetBoolPref(kNegotiateAuthNativeImp, &gssNativeImp);
     }
 
     PRLibrary *lib = nullptr;
 
--- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp
@@ -203,17 +203,16 @@ NS_IMETHODIMP nsAutoConfig::Observe(nsIS
 
     return rv;
 }
 
 nsresult nsAutoConfig::downloadAutoConfig()
 {
     nsresult rv;
     nsAutoCString emailAddr;
-    nsXPIDLCString urlName;
     static bool firstTime = true;
 
     if (mConfigURL.IsEmpty()) {
         MOZ_LOG(MCD, LogLevel::Debug, ("global config url is empty - did you set autoadmin.global_config_url?\n"));
         NS_WARNING("AutoConfig called without global_config_url");
         return NS_OK;
     }
 
@@ -458,17 +457,17 @@ nsresult nsAutoConfig::writeFailoverFile
     outStr->Close();
     return rv;
 }
 
 nsresult nsAutoConfig::getEmailAddr(nsACString & emailAddr)
 {
 
     nsresult rv;
-    nsXPIDLCString prefValue;
+    nsCString prefValue;
 
     /* Getting an email address through set of three preferences:
        First getting a default account with
        "mail.accountmanager.defaultaccount"
        second getting an associated id with the default account
        Third getting an email address with id
     */
 
--- a/intl/strres/nsStringBundle.cpp
+++ b/intl/strres/nsStringBundle.cpp
@@ -638,17 +638,16 @@ nsStringBundleService::CreateExtensibleB
 #define GLOBAL_PROPERTIES "chrome://global/locale/global-strres.properties"
 
 nsresult
 nsStringBundleService::FormatWithBundle(nsIStringBundle* bundle, nsresult aStatus,
                                         uint32_t argCount, char16_t** argArray,
                                         nsAString& result)
 {
   nsresult rv;
-  nsXPIDLCString key;
 
   // try looking up the error message with the int key:
   uint16_t code = NS_ERROR_GET_CODE(aStatus);
   rv = bundle->FormatStringFromID(code, (const char16_t**)argArray, argCount, result);
 
   // If the int key fails, try looking up the default error message. E.g. print:
   //   An unknown error has occurred (0x804B0003).
   if (NS_FAILED(rv)) {
--- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp
@@ -51,17 +51,17 @@ XPCNativeMember::NewFunctionObject(XPCCa
 
 bool
 XPCNativeMember::Resolve(XPCCallContext& ccx, XPCNativeInterface* iface,
                          HandleObject parent, Value* vp)
 {
     MOZ_ASSERT(iface == GetInterface());
     if (IsConstant()) {
         RootedValue resultVal(ccx);
-        nsXPIDLCString name;
+        nsCString name;
         if (NS_FAILED(iface->GetInterfaceInfo()->GetConstant(mIndex, &resultVal,
                                                              getter_Copies(name))))
             return false;
 
         *vp = resultVal;
 
         return true;
     }
--- a/layout/base/nsStyleSheetService.cpp
+++ b/layout/base/nsStyleSheetService.cpp
@@ -68,17 +68,17 @@ nsStyleSheetService::RegisterFromEnumera
 
     nsCOMPtr<nsISupportsCString> icStr = do_QueryInterface(element);
     NS_ASSERTION(icStr,
                  "category manager entries must be nsISupportsCStrings");
 
     nsAutoCString name;
     icStr->GetData(name);
 
-    nsXPIDLCString spec;
+    nsCString spec;
     aManager->GetCategoryEntry(aCategory, name.get(), getter_Copies(spec));
 
     nsCOMPtr<nsIURI> uri;
     NS_NewURI(getter_AddRefs(uri), spec);
     if (uri)
       LoadAndRegisterSheetInternal(uri, aSheetType);
   }
 }
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -749,17 +749,17 @@ Preferences::Init()
     for (unsigned int i = 0; i < gInitPrefs->Length(); i++) {
       Preferences::SetPreference(gInitPrefs->ElementAt(i));
     }
     delete gInitPrefs;
     gInitPrefs = nullptr;
     return NS_OK;
   }
 
-  nsXPIDLCString lockFileName;
+  nsCString lockFileName;
   /*
    * The following is a small hack which will allow us to only load the library
    * which supports the netscape.cfg file if the preference is defined. We
    * test for the existence of the pref, set in the all.js (mozilla) or
    * all-ns.js (netscape 6), and if it exists we startup the pref config
    * category which will do the rest.
    */
 
--- a/modules/libpref/nsPrefBranch.cpp
+++ b/modules/libpref/nsPrefBranch.cpp
@@ -237,17 +237,17 @@ nsresult nsPrefBranch::SetCharPrefIntern
   return PREF_SetCharPref(pref.get(), aValue, mIsDefault);
 }
 
 NS_IMETHODIMP nsPrefBranch::GetStringPref(const char *aPrefName,
                                           const nsACString& aDefaultValue,
                                           uint8_t _argc,
                                           nsACString& _retval)
 {
-  nsXPIDLCString utf8String;
+  nsCString utf8String;
   nsresult rv = GetCharPref(aPrefName, getter_Copies(utf8String));
   if (NS_SUCCEEDED(rv)) {
     _retval = utf8String;
     return rv;
   }
 
   if (_argc == 1) {
     _retval = aDefaultValue;
@@ -295,18 +295,18 @@ NS_IMETHODIMP nsPrefBranch::SetIntPref(c
   const PrefName& pref = getPrefName(aPrefName);
   return PREF_SetIntPref(pref.get(), aValue, mIsDefault);
 }
 
 NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID & aType, void **_retval)
 {
   NS_ENSURE_ARG(aPrefName);
 
-  nsresult       rv;
-  nsXPIDLCString utf8String;
+  nsresult rv;
+  nsCString utf8String;
 
   // we have to do this one first because it's different than all the rest
   if (aType.Equals(NS_GET_IID(nsIPrefLocalizedString))) {
     nsCOMPtr<nsIPrefLocalizedString> theString(do_CreateInstance(NS_PREFLOCALIZEDSTRING_CONTRACTID, &rv));
     if (NS_FAILED(rv)) return rv;
 
     const PrefName& pref = getPrefName(aPrefName);
     bool    bNeedDefault = false;
--- a/netwerk/base/nsChannelClassifier.cpp
+++ b/netwerk/base/nsChannelClassifier.cpp
@@ -739,17 +739,17 @@ nsChannelClassifier::HasBeenClassified(n
     }
 
     nsCOMPtr<nsICacheEntry> cacheEntry =
         do_QueryInterface(cacheToken);
     if (!cacheEntry) {
         return false;
     }
 
-    nsXPIDLCString tag;
+    nsCString tag;
     cacheEntry->GetMetaDataElement("necko:classified", getter_Copies(tag));
     return tag.EqualsLiteral("1");
 }
 
 //static
 bool
 nsChannelClassifier::SameLoadingURI(nsIDocument *aDoc, nsIChannel *aChannel)
 {
--- a/netwerk/base/nsProtocolProxyService.cpp
+++ b/netwerk/base/nsProtocolProxyService.cpp
@@ -423,17 +423,17 @@ proxy_MaskIPv6Addr(PRIPv6Addr &addr, uin
     }
 }
 
 static void
 proxy_GetStringPref(nsIPrefBranch *aPrefBranch,
                     const char    *aPref,
                     nsCString     &aResult)
 {
-    nsXPIDLCString temp;
+    nsCString temp;
     nsresult rv = aPrefBranch->GetCharPref(aPref, getter_Copies(temp));
     if (NS_FAILED(rv))
         aResult.Truncate();
     else {
         aResult.Assign(temp);
         // all of our string prefs are hostnames, so we should remove any
         // whitespace characters that the user might have unknowingly entered.
         aResult.StripWhitespace();
@@ -556,17 +556,17 @@ nsProtocolProxyService::ReloadNetworkPAC
 
     int32_t type;
     nsresult rv = prefs->GetIntPref(PROXY_PREF("type"), &type);
     if (NS_FAILED(rv)) {
         return NS_OK;
     }
 
     if (type == PROXYCONFIG_PAC) {
-        nsXPIDLCString pacSpec;
+        nsCString pacSpec;
         prefs->GetCharPref(PROXY_PREF("autoconfig_url"),
                            getter_Copies(pacSpec));
         if (!pacSpec.IsEmpty()) {
             nsCOMPtr<nsIURI> pacURI;
             rv = NS_NewURI(getter_AddRefs(pacURI), pacSpec);
             if(!NS_SUCCEEDED(rv)) {
                 return rv;
             }
@@ -688,17 +688,17 @@ nsProtocolProxyService::Observe(nsISuppo
 }
 
 void
 nsProtocolProxyService::PrefsChanged(nsIPrefBranch *prefBranch,
                                      const char    *pref)
 {
     nsresult rv = NS_OK;
     bool reloadPAC = false;
-    nsXPIDLCString tempString;
+    nsCString tempString;
 
     if (!pref || !strcmp(pref, PROXY_PREF("type"))) {
         int32_t type = -1;
         rv = prefBranch->GetIntPref(PROXY_PREF("type"), &type);
         if (NS_SUCCEEDED(rv)) {
             // bug 115720 - for ns4.x backwards compatibility
             if (type == PROXYCONFIG_DIRECT4X) {
                 type = PROXYCONFIG_DIRECT;
@@ -1242,17 +1242,17 @@ nsProtocolProxyService::ReloadPAC()
     if (!prefs)
         return NS_OK;
 
     int32_t type;
     nsresult rv = prefs->GetIntPref(PROXY_PREF("type"), &type);
     if (NS_FAILED(rv))
         return NS_OK;
 
-    nsXPIDLCString pacSpec;
+    nsCString pacSpec;
     if (type == PROXYCONFIG_PAC)
         prefs->GetCharPref(PROXY_PREF("autoconfig_url"), getter_Copies(pacSpec));
     else if (type == PROXYCONFIG_WPAD)
         pacSpec.AssignLiteral(WPAD_URL);
     else if (type == PROXYCONFIG_SYSTEM) {
         if (mSystemProxySettings) {
             AsyncConfigureFromPAC(true, true);
         } else {
--- a/netwerk/cache2/OldWrappers.cpp
+++ b/netwerk/cache2/OldWrappers.cpp
@@ -202,17 +202,17 @@ NS_IMETHODIMP _OldVisitCallbackWrapper::
 {
   MOZ_ASSERT(!strcmp(deviceID, mDeviceID));
 
   nsresult rv;
 
   *_retval = true;
 
   // Read all informative properties from the entry.
-  nsXPIDLCString clientId;
+  nsCString clientId;
   rv = entryInfo->GetClientID(getter_Copies(clientId));
   if (NS_FAILED(rv))
     return NS_OK;
 
   if (mLoadInfo->IsPrivate() !=
       StringBeginsWith(clientId, NS_LITERAL_CSTRING("HTTP-memory-only-PB"))) {
     return NS_OK;
   }
--- a/netwerk/dns/nsIDNService.cpp
+++ b/netwerk/dns/nsIDNService.cpp
@@ -119,17 +119,17 @@ void nsIDNService::prefsChanged(nsIPrefB
   }
   if (!pref || NS_LITERAL_STRING(NS_NET_PREF_IDNUSEWHITELIST).Equals(pref)) {
     bool val;
     if (NS_SUCCEEDED(prefBranch->GetBoolPref(NS_NET_PREF_IDNUSEWHITELIST,
                                              &val)))
       mIDNUseWhitelist = val;
   }
   if (!pref || NS_LITERAL_STRING(NS_NET_PREF_IDNRESTRICTION).Equals(pref)) {
-    nsXPIDLCString profile;
+    nsCString profile;
     if (NS_FAILED(prefBranch->GetCharPref(NS_NET_PREF_IDNRESTRICTION,
                                           getter_Copies(profile)))) {
       profile.Truncate();
     }
     if (profile.EqualsLiteral("moderate")) {
       mRestrictionProfile = eModeratelyRestrictiveProfile;
     } else if (profile.EqualsLiteral("high")) {
       mRestrictionProfile = eHighlyRestrictiveProfile;
--- a/netwerk/mime/nsMIMEHeaderParamImpl.cpp
+++ b/netwerk/mime/nsMIMEHeaderParamImpl.cpp
@@ -73,18 +73,18 @@ nsMIMEHeaderParamImpl::DoGetParameter(co
                                       bool aTryLocaleCharset,
                                       char **aLang, nsAString& aResult)
 {
     aResult.Truncate();
     nsresult rv;
 
     // get parameter (decode RFC 2231/5987 when applicable, as specified by
     // aDecoding (5987 being a subset of 2231) and return charset.)
-    nsXPIDLCString med;
-    nsXPIDLCString charset;
+    nsCString med;
+    nsCString charset;
     rv = DoParameterInternal(PromiseFlatCString(aHeaderVal).get(), aParamName,
                              aDecoding, getter_Copies(charset), aLang,
                              getter_Copies(med));
     if (NS_FAILED(rv))
         return rv;
 
     // convert to UTF-8 after charset conversion and RFC 2047 decoding
     // if necessary.
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -1919,17 +1919,17 @@ Http2Session::CachePushCheckCallback::On
 
   if ((cachedResponseHead.Status() / 100) != 2) {
     // Assume the push is sending us a success, while we don't have one in the
     // cache, so we'll accept the push.
     return NS_OK;
   }
 
   // Get the method that was used to generate the cached response
-  nsXPIDLCString buf;
+  nsCString buf;
   rv = entry->GetMetaDataElement("request-method", getter_Copies(buf));
   if (NS_FAILED(rv)) {
     // Can't check request method, accept the push
     return NS_OK;
   }
   nsAutoCString pushedMethod;
   mRequestHead.Method(pushedMethod);
   if (!buf.Equals(pushedMethod)) {
@@ -1981,17 +1981,17 @@ Http2Session::CachePushCheckCallback::On
   nsAutoCString cacheControlRequestHeader;
   Unused << mRequestHead.GetHeader(nsHttp::Cache_Control, cacheControlRequestHeader);
   CacheControlParser cacheControlRequest(cacheControlRequestHeader);
   if (cacheControlRequest.NoStore()) {
     // Don't use a no-store cache entry, accept the push.
     return NS_OK;
   }
 
-  nsXPIDLCString cachedAuth;
+  nsCString cachedAuth;
   rv = entry->GetMetaDataElement("auth", getter_Copies(cachedAuth));
   if (NS_SUCCEEDED(rv)) {
     uint32_t lastModifiedTime;
     rv = entry->GetLastModified(&lastModifiedTime);
     if (NS_SUCCEEDED(rv)) {
       if ((gHttpHandler->SessionStartTime() > lastModifiedTime) && !cachedAuth.IsEmpty()) {
         // Need to revalidate this, as the auth is old. Accept the push.
         return NS_OK;
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -3196,17 +3196,17 @@ void
 HttpBaseChannel::AddCookiesToRequest()
 {
   if (mLoadFlags & LOAD_ANONYMOUS) {
     return;
   }
 
   bool useCookieService =
     (XRE_IsParentProcess());
-  nsXPIDLCString cookie;
+  nsCString cookie;
   if (useCookieService) {
     nsICookieService *cs = gHttpHandler->GetCookieService();
     if (cs) {
       cs->GetCookieStringFromHttp(mURI,
                                   nullptr,
                                   this, getter_Copies(cookie));
     }
 
--- a/netwerk/protocol/http/nsHttp.cpp
+++ b/netwerk/protocol/http/nsHttp.cpp
@@ -468,17 +468,17 @@ ValidationRequired(bool isForcedValid, n
 
     LOG(("%salidating based on expiration time\n", doValidation ? "V" : "Not v"));
     return doValidation;
 }
 
 nsresult
 GetHttpResponseHeadFromCacheEntry(nsICacheEntry *entry, nsHttpResponseHead *cachedResponseHead)
 {
-    nsXPIDLCString buf;
+    nsCString buf;
     // A "original-response-headers" metadata element holds network original headers,
     // i.e. the headers in the form as they arrieved from the network.
     // We need to get the network original headers first, because we need to keep them
     // in order.
     nsresult rv = entry->GetMetaDataElement("original-response-headers", getter_Copies(buf));
     if (NS_SUCCEEDED(rv)) {
         rv = cachedResponseHead->ParseCachedOriginalHeaders((char *) buf.get());
         if (NS_FAILED(rv)) {
@@ -527,17 +527,17 @@ CheckPartial(nsICacheEntry* aEntry, int6
     return NS_OK;
 }
 
 void
 DetermineFramingAndImmutability(nsICacheEntry *entry,
         nsHttpResponseHead *responseHead, bool isHttps,
         bool *weaklyFramed, bool *isImmutable)
 {
-    nsXPIDLCString framedBuf;
+    nsCString framedBuf;
     nsresult rv = entry->GetMetaDataElement("strongly-framed", getter_Copies(framedBuf));
     // describe this in terms of explicitly weakly framed so as to be backwards
     // compatible with old cache contents which dont have strongly-framed makers
     *weaklyFramed = NS_SUCCEEDED(rv) && framedBuf.EqualsLiteral("0");
     *isImmutable = !*weaklyFramed && isHttps && responseHead->Immutable();
 }
 
 } // namespace nsHttp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -3161,17 +3161,17 @@ nsHttpChannel::ResponseWouldVary(nsICach
             if (*token == '*')
                 return true; // if we encounter this, just get out of here
 
             // build cache meta data key...
             metaKey = prefix + nsDependentCString(token);
 
             // check the last value of the given request header to see if it has
             // since changed.  if so, then indeed the cached response is invalid.
-            nsXPIDLCString lastVal;
+            nsCString lastVal;
             entry->GetMetaDataElement(metaKey.get(), getter_Copies(lastVal));
             LOG(("nsHttpChannel::ResponseWouldVary [channel=%p] "
                      "stored value = \"%s\"\n",
                  this, lastVal.get()));
 
             // Look for value of "Cookie" in the request headers
             nsHttpAtom atom = nsHttp::ResolveAtom(token);
             nsAutoCString newVal;
@@ -4039,17 +4039,17 @@ nsHttpChannel::OnCacheEntryCheck(nsICach
         *aResult = ENTRY_NOT_WANTED;
         return NS_OK;
     }
 
     // Be pessimistic: assume the cache entry has no useful data.
     *aResult = ENTRY_WANTED;
     mCachedContentIsValid = false;
 
-    nsXPIDLCString buf;
+    nsCString buf;
 
     // Get the method that was used to generate the cached response
     rv = entry->GetMetaDataElement("request-method", getter_Copies(buf));
     NS_ENSURE_SUCCESS(rv, rv);
 
     bool methodWasHead = buf.EqualsLiteral("HEAD");
     bool methodWasGet = buf.EqualsLiteral("GET");
 
@@ -7854,17 +7854,17 @@ nsHttpChannel::GetCacheTokenExpirationTi
 NS_IMETHODIMP
 nsHttpChannel::GetCacheTokenCachedCharset(nsACString &_retval)
 {
     nsresult rv;
 
     if (!mCacheEntry)
         return NS_ERROR_NOT_AVAILABLE;
 
-    nsXPIDLCString cachedCharset;
+    nsCString cachedCharset;
     rv = mCacheEntry->GetMetaDataElement("charset",
                                          getter_Copies(cachedCharset));
     if (NS_SUCCEEDED(rv))
         _retval = cachedCharset;
 
     return rv;
 }
 
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
@@ -947,17 +947,17 @@ nsHttpChannelAuthProvider::GetCredential
     //
     // always store the credentials we're trying now so that they will be used
     // on subsequent links.  This will potentially remove good credentials from
     // the cache.  This is ok as we don't want to use cached credentials if the
     // user specified something on the URI or in another manner.  This is so
     // that we don't transparently authenticate as someone they're not
     // expecting to authenticate as.
     //
-    nsXPIDLCString result;
+    nsCString result;
     rv = GenCredsAndSetEntry(auth, proxyAuth, scheme.get(), host, port,
                              path.get(), realm.get(), challenge, *ident,
                              sessionStateGrip, getter_Copies(result));
     if (NS_SUCCEEDED(rv))
         creds = result;
     return rv;
 }
 
@@ -1348,17 +1348,17 @@ NS_IMETHODIMP nsHttpChannelAuthProvider:
     rv = GetAuthenticator(mCurrentChallenge.get(), unused,
                           getter_AddRefs(auth));
     if (NS_FAILED(rv)) {
         MOZ_ASSERT(false, "GetAuthenticator failed");
         OnAuthCancelled(aContext, true);
         return NS_OK;
     }
 
-    nsXPIDLCString creds;
+    nsCString creds;
     rv = GenCredsAndSetEntry(auth, mProxyAuth,
                              scheme.get(), host, port, path.get(),
                              realm.get(), mCurrentChallenge.get(), *ident,
                              sessionStateGrip, getter_Copies(creds));
 
     mCurrentChallenge.Truncate();
     if (NS_FAILED(rv)) {
         OnAuthCancelled(aContext, true);
@@ -1688,17 +1688,17 @@ nsHttpChannelAuthProvider::SetAuthorizat
         if (ident.IsEmpty()) {
             rv = ident.Set(entry->Identity());
             MOZ_ASSERT(NS_SUCCEEDED(rv));
             identFromURI = false;
         }
         else
             identFromURI = true;
 
-        nsXPIDLCString temp;
+        nsCString temp;  // this must have the same lifetime as creds
         const char *creds     = entry->Creds();
         const char *challenge = entry->Challenge();
         // we can only send a preemptive Authorization header if we have either
         // stored credentials or a stored challenge from which to derive
         // credentials.  if the identity is from the URI, then we cannot use
         // the stored credentials.
         if ((!creds[0] || identFromURI) && challenge[0]) {
             nsCOMPtr<nsIHttpAuthenticator> auth;
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ -528,24 +528,24 @@ NS_IMETHODIMP
 nsWyciwygChannel::GetCharsetAndSource(int32_t* aSource, nsACString& aCharset)
 {
   MOZ_ASSERT(mMode == READING);
 
   if (!mCacheEntry) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  nsXPIDLCString data;
+  nsCString data;
   mCacheEntry->GetMetaDataElement("charset", getter_Copies(data));
 
   if (data.IsEmpty()) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  nsXPIDLCString sourceStr;
+  nsCString sourceStr;
   mCacheEntry->GetMetaDataElement("charset-source", getter_Copies(sourceStr));
 
   int32_t source;
   nsresult err;
   source = sourceStr.ToInteger(&err);
   if (NS_FAILED(err) || source == 0) {
     return NS_ERROR_NOT_AVAILABLE;
   }
--- a/security/manager/ssl/nsNSSCertificate.cpp
+++ b/security/manager/ssl/nsNSSCertificate.cpp
@@ -1507,17 +1507,17 @@ nsNSSCertificate::Read(nsIObjectInputStr
   }
 
   uint32_t len;
   rv = aStream->Read32(&len);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
-  nsXPIDLCString str;
+  nsCString str;
   rv = aStream->ReadBytes(len, getter_Copies(str));
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   if (!InitFromDER(const_cast<char*>(str.get()), len)) {
     return NS_ERROR_UNEXPECTED;
   }
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -144,17 +144,17 @@ nsTypeAheadFind::PrefsReset()
   NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE);
 
   prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly",
                           &mStartLinksOnlyPref);
 
   bool isSoundEnabled = true;
   prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound",
                            &isSoundEnabled);
-  nsXPIDLCString soundStr;
+  nsCString soundStr;
   if (isSoundEnabled)
     prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL", getter_Copies(soundStr));
 
   mNotFoundSoundURL = soundStr;
 
   if (!mNotFoundSoundURL.IsEmpty() && !mNotFoundSoundURL.EqualsLiteral("beep")) {
     if (!mSoundInterface) {
       mSoundInterface = do_CreateInstance("@mozilla.org/sound;1");
--- a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
@@ -126,17 +126,17 @@ InitListUpdateRequest(ThreatType aThreat
 static ClientInfo*
 CreateClientInfo()
 {
   ClientInfo* c = new ClientInfo();
 
   nsCOMPtr<nsIPrefBranch> prefBranch =
     do_GetService(NS_PREFSERVICE_CONTRACTID);
 
-  nsXPIDLCString clientId;
+  nsCString clientId;
   nsresult rv = prefBranch->GetCharPref("browser.safebrowsing.id",
                                         getter_Copies(clientId));
 
   if (NS_FAILED(rv)) {
     clientId = "Firefox"; // Use "Firefox" as fallback.
   }
 
   c->set_client_id(clientId.get());
@@ -547,17 +547,17 @@ nsUrlClassifierUtils::ReadProvidersFromP
   // Now we have all providers. Check which one owns |aTableName|.
   // e.g. The owning lists of provider "google" is defined in
   // "browser.safebrowsing.provider.google.lists".
   for (auto itr = providers.Iter(); !itr.Done(); itr.Next()) {
     auto entry = itr.Get();
     nsCString provider(entry->GetKey());
     nsPrintfCString owninListsPref("%s.lists", provider.get());
 
-    nsXPIDLCString owningLists;
+    nsCString owningLists;
     nsresult rv = prefBranch->GetCharPref(owninListsPref.get(),
                                           getter_Copies(owningLists));
     if (NS_FAILED(rv)) {
       continue;
     }
 
     // We've got the owning lists (represented as string) of |provider|.
     // Build the dictionary for the owning list and the current provider.
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1792,17 +1792,17 @@ StartRemoteClient(const char* aDesktopSt
                   const char* profile,
                   const char* username)
 {
   XRemoteClient client;
   nsresult rv = client.Init();
   if (NS_FAILED(rv))
     return REMOTE_NOT_FOUND;
 
-  nsXPIDLCString response;
+  nsCString response;
   bool success = false;
   rv = client.SendCommandLine(program.get(), username, profile,
                               gArgc, gArgv, aDesktopStartupID,
                               getter_Copies(response), &success);
   // did the command fail?
   if (!success)
     return REMOTE_NOT_FOUND;
 
@@ -4319,17 +4319,17 @@ XREMain::XRE_mainRun()
 #ifdef MOZ_CRASHREPORTER
   // tell the crash reporter to also send the release channel
   nsCOMPtr<nsIPrefService> prefs = do_GetService("@mozilla.org/preferences-service;1", &rv);
   if (NS_SUCCEEDED(rv)) {
     nsCOMPtr<nsIPrefBranch> defaultPrefBranch;
     rv = prefs->GetDefaultBranch(nullptr, getter_AddRefs(defaultPrefBranch));
 
     if (NS_SUCCEEDED(rv)) {
-      nsXPIDLCString sval;
+      nsCString sval;
       rv = defaultPrefBranch->GetCharPref("app.update.channel", getter_Copies(sval));
       if (NS_SUCCEEDED(rv)) {
         CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ReleaseChannel"),
                                             sval);
       }
     }
   }
   // Needs to be set after xpcom initialization.
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -407,19 +407,16 @@ nsresult nsDocumentOpenInfo::DispatchCon
 
   if (NS_SUCCEEDED(rv) && (disposition == nsIChannel::DISPOSITION_ATTACHMENT) &&
       allowContentDispositionToForceExternalHandling) {
     forceExternalHandling = true;
   }
 
   LOG(("  forceExternalHandling: %s", forceExternalHandling ? "yes" : "no"));
 
-  // The type or data the contentListener wants.
-  nsXPIDLCString desiredContentType;
-
   if (!forceExternalHandling)
   {
     //
     // First step: See whether m_contentListener wants to handle this
     // content type.
     //
     if (m_contentListener && TryContentListener(m_contentListener, aChannel)) {
       LOG(("  Success!  Our default listener likes this type"));
@@ -685,17 +682,17 @@ nsDocumentOpenInfo::TryContentListener(n
 {
   LOG(("[0x%p] nsDocumentOpenInfo::TryContentListener; mFlags = 0x%x",
        this, mFlags));
 
   NS_PRECONDITION(aListener, "Must have a non-null listener");
   NS_PRECONDITION(aChannel, "Must have a channel");
   
   bool listenerWantsContent = false;
-  nsXPIDLCString typeToUse;
+  nsCString typeToUse;
   
   if (mFlags & nsIURILoader::IS_CONTENT_PREFERRED) {
     aListener->IsPreferred(mContentType.get(),
                            getter_Copies(typeToUse),
                            &listenerWantsContent);
   } else {
     aListener->CanHandleContent(mContentType.get(), false,
                                 getter_Copies(typeToUse),
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -2732,17 +2732,17 @@ nsExternalHelperAppService::GetTypeFromE
   // Let's see if an extension added something
   nsCOMPtr<nsICategoryManager> catMan(
     do_GetService("@mozilla.org/categorymanager;1"));
   if (catMan) {
     // The extension in the category entry is always stored as lowercase
     nsAutoCString lowercaseFileExt(aFileExt);
     ToLowerCase(lowercaseFileExt);
     // Read the MIME type from the category entry, if available
-    nsXPIDLCString type;
+    nsCString type;
     nsresult rv = catMan->GetCategoryEntry("ext-to-type-mapping",
                                            lowercaseFileExt.get(),
                                            getter_Copies(type));
     if (NS_SUCCEEDED(rv)) {
       aContentType = type;
       return NS_OK;
     }
   }
--- a/widget/cocoa/nsClipboard.mm
+++ b/widget/cocoa/nsClipboard.mm
@@ -439,17 +439,17 @@ nsClipboard::HasDataMatchingFlavors(cons
     if (NS_SUCCEEDED(rv)) {
       uint32_t transferableFlavorCount;
       transferableFlavorList->GetLength(&transferableFlavorCount);
       for (uint32_t j = 0; j < transferableFlavorCount; j++) {
         nsCOMPtr<nsISupportsCString> currentTransferableFlavor =
             do_QueryElementAt(transferableFlavorList, j);
         if (!currentTransferableFlavor)
           continue;
-        nsXPIDLCString transferableFlavorStr;
+        nsCString transferableFlavorStr;
         currentTransferableFlavor->ToString(getter_Copies(transferableFlavorStr));
 
         for (uint32_t k = 0; k < aLength; k++) {
           if (transferableFlavorStr.Equals(aFlavorList[k])) {
             *outResult = true;
             return NS_OK;
           }
         }
--- a/widget/cocoa/nsDragService.mm
+++ b/widget/cocoa/nsDragService.mm
@@ -594,17 +594,17 @@ nsDragService::IsDataFlavorSupported(con
         continue;
 
       uint32_t flavorCount;
       flavorList->GetLength(&flavorCount);
       for (uint32_t j = 0; j < flavorCount; j++) {
         nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, j);
         if (!currentFlavor)
           continue;
-        nsXPIDLCString flavorStr;
+        nsCString flavorStr;
         currentFlavor->ToString(getter_Copies(flavorStr));
         if (dataFlavor.Equals(flavorStr)) {
           *_retval = true;
           return NS_OK;
         }
       }
     }
   }
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -320,17 +320,17 @@ nsHTTPIndex::OnStopRequest(nsIRequest *r
   // something exploded in OnStartRequest().
   if (! mDirectory)
     return NS_BINDING_ABORTED;
 
   mParser->OnStopRequest(request,aContext,aStatus);
 
   nsresult rv;
 
-  nsXPIDLCString commentStr;
+  nsCString commentStr;
   mParser->GetComment(getter_Copies(commentStr));
 
   nsCOMPtr<nsIRDFLiteral> comment;
   rv = mDirRDF->GetLiteral(NS_ConvertASCIItoUTF16(commentStr).get(), getter_AddRefs(comment));
   if (NS_FAILED(rv)) return rv;
 
   rv = Assert(mDirectory, kNC_Comment, comment, true);
   if (NS_FAILED(rv)) return rv;
@@ -374,17 +374,17 @@ nsHTTPIndex::OnIndexAvailable(nsIRequest
   if (! baseStr) {
     NS_ERROR("Could not reconstruct base uri");
     return NS_ERROR_UNEXPECTED;
   }
 
   // we found the filename; construct a resource for its entry
   nsAutoCString entryuriC(baseStr);
 
-  nsXPIDLCString filename;
+  nsCString filename;
   nsresult rv = aIndex->GetLocation(getter_Copies(filename));
   if (NS_FAILED(rv)) return rv;
   entryuriC.Append(filename);
 
   // if its a directory, make sure it ends with a trailing slash.
   uint32_t type;
   rv = aIndex->GetType(&type);
   if (NS_FAILED(rv))