Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 18 Aug 2017 10:58:47 -0400
changeset 375653 d2571908d00cad44be3fc9dcc14426060b8b0a77
parent 375652 cb4c86e50ed49e1209bda5ee0116e22dde06d819
child 375654 399db8547abb4549b05ffd419fab29c8cbd6c2ae
push id32358
push userkwierso@gmail.com
push dateFri, 18 Aug 2017 22:53:28 +0000
treeherdermozilla-central@4f4487cc2d30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1390428
milestone57.0a1
backs outfbf0e8609abb4b978070dd0cbfcab6de7b2cda73
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
Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE.
dom/base/nsContentUtils.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsDocument.cpp
dom/base/nsScriptNameSpaceManager.cpp
dom/plugins/base/nsPluginHost.cpp
dom/push/PushNotifier.cpp
extensions/pref/autoconfig/src/nsReadConfig.cpp
gfx/thebes/gfxSVGGlyphs.cpp
image/SVGDocumentWrapper.cpp
intl/strres/nsStringBundle.cpp
js/xpconnect/src/XPCWrappedNativeInfo.cpp
modules/libpref/nsPrefBranch.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/http/nsHttpHandler.cpp
netwerk/streamconv/converters/nsIndexedToHTML.cpp
rdf/base/nsInMemoryDataSource.cpp
rdf/base/nsRDFContentSink.cpp
rdf/base/nsRDFService.cpp
toolkit/components/startup/nsUserInfoUnix.cpp
toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
toolkit/xre/nsAppStartupNotifier.cpp
uriloader/base/nsURILoader.cpp
widget/cocoa/nsClipboard.mm
widget/cocoa/nsDragService.mm
widget/gtk/nsClipboard.cpp
widget/gtk/nsColorPicker.cpp
widget/gtk/nsDragService.cpp
widget/gtk/nsFilePicker.cpp
widget/nsTransferable.cpp
widget/windows/nsClipboard.cpp
xpcom/components/nsCategoryManager.cpp
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7129,22 +7129,22 @@ nsContentUtils::FindInternalContentViewe
 
   // one helper factory, please
   nsCOMPtr<nsICategoryManager> catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
   if (!catMan)
     return nullptr;
 
   nsCOMPtr<nsIDocumentLoaderFactory> docFactory;
 
-  nsCString contractID;
+  nsXPIDLCString contractID;
   nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers",
                                          PromiseFlatCString(aType).get(),
                                          getter_Copies(contractID));
   if (NS_SUCCEEDED(rv)) {
-    docFactory = do_GetService(contractID.get());
+    docFactory = do_GetService(contractID);
     if (docFactory && aLoaderType) {
       if (contractID.EqualsLiteral(CONTENT_DLF_CONTRACTID))
         *aLoaderType = TYPE_CONTENT;
       else if (contractID.EqualsLiteral(PLUGIN_DLF_CONTRACTID))
         *aLoaderType = TYPE_PLUGIN;
       else
       *aLoaderType = TYPE_UNKNOWN;
     }
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -801,19 +801,19 @@ nsDOMClassInfo::PostCreatePrototype(JSCo
       iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID));
 
     if (iim) {
       nsCOMPtr<nsIInterfaceInfo> if_info;
       iim->GetInfoForIID(mData->mProtoChainInterface,
                          getter_AddRefs(if_info));
 
       if (if_info) {
-        nsCString name;
+        nsXPIDLCString name;
         if_info->GetName(getter_Copies(name));
-        NS_ASSERTION(nsCRT::strcmp(CutPrefix(name.get()), mData->mClass.name) == 0,
+        NS_ASSERTION(nsCRT::strcmp(CutPrefix(name), mData->mClass.name) == 0,
                      "Class name and proto chain interface name mismatch!");
       }
     }
   }
 #endif
 
   // Make prototype delegation work correctly. Consider if a site sets
   // HTMLElement.prototype.foopy = function () { ... } Now, calling
@@ -954,21 +954,21 @@ DefineInterfaceConstants(JSContext *cx, 
   rv = if_info->GetParent(getter_AddRefs(parent_if_info));
   NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && parent_if_info, rv);
 
   uint16_t parent_constant_count, i;
   parent_if_info->GetConstantCount(&parent_constant_count);
 
   JS::Rooted<JS::Value> v(cx);
   for (i = parent_constant_count; i < constant_count; i++) {
-    nsCString name;
+    nsXPIDLCString name;
     rv = if_info->GetConstant(i, &v, getter_Copies(name));
     NS_ENSURE_TRUE(NS_SUCCEEDED(rv), rv);
 
-    if (!::JS_DefineProperty(cx, obj, name.get(), v,
+    if (!::JS_DefineProperty(cx, obj, name, v,
                              JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT,
                              JS_STUBGETTER, JS_STUBSETTER)) {
       return NS_ERROR_UNEXPECTED;
     }
   }
 
   return NS_OK;
 }
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1005,22 +1005,22 @@ nsExternalResourceMap::PendingLoad::Setu
   nsCOMPtr<nsIInterfaceRequestor> newCallbacks =
     new LoadgroupCallbacks(callbacks);
   newLoadGroup->SetNotificationCallbacks(newCallbacks);
 
   // This is some serious hackery cribbed from docshell
   nsCOMPtr<nsICategoryManager> catMan =
     do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
   NS_ENSURE_TRUE(catMan, NS_ERROR_NOT_AVAILABLE);
-  nsCString contractId;
+  nsXPIDLCString contractId;
   nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", type.get(),
                                          getter_Copies(contractId));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIDocumentLoaderFactory> docLoaderFactory =
-    do_GetService(contractId.get());
+    do_GetService(contractId);
   NS_ENSURE_TRUE(docLoaderFactory, NS_ERROR_NOT_AVAILABLE);
 
   nsCOMPtr<nsIContentViewer> viewer;
   nsCOMPtr<nsIStreamListener> listener;
   rv = docLoaderFactory->CreateInstance("external-resource", chan, newLoadGroup,
                                         type, nullptr, nullptr,
                                         getter_AddRefs(listener),
                                         getter_AddRefs(viewer));
--- a/dom/base/nsScriptNameSpaceManager.cpp
+++ b/dom/base/nsScriptNameSpaceManager.cpp
@@ -310,27 +310,27 @@ nsScriptNameSpaceManager::OperateCategor
     if (!s || s->mType != type) {
       return NS_OK;
     }
 
     RemoveFromHash(&entry);
     return NS_OK;
   }
 
-  nsCString contractId;
+  nsXPIDLCString contractId;
   rv = aCategoryManager->GetCategoryEntry(aCategory, categoryEntry.get(),
                                           getter_Copies(contractId));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIComponentRegistrar> registrar;
   rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCID *cidPtr;
-  rv = registrar->ContractIDToCID(contractId.get(), &cidPtr);
+  rv = registrar->ContractIDToCID(contractId, &cidPtr);
 
   if (NS_FAILED(rv)) {
     NS_WARNING("Bad contract id registed with the script namespace manager");
     return NS_OK;
   }
 
   // Copy CID onto the stack, so we can free it right away and avoid having
   // to add cleanup code at every exit point from this function.
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -2703,21 +2703,21 @@ nsPluginHost::RegisterWithCategoryManage
       if (HavePluginForType(aMimeType)) {
         return;
       }
     } else {
       MOZ_ASSERT(aType == ePluginUnregister, "Unknown nsRegisterType");
     }
 
     // Only delete the entry if a plugin registered for it
-    nsCString value;
+    nsXPIDLCString value;
     nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers",
                                            aMimeType.get(),
                                            getter_Copies(value));
-    if (NS_SUCCEEDED(rv) && strcmp(value.get(), contractId) == 0) {
+    if (NS_SUCCEEDED(rv) && strcmp(value, contractId) == 0) {
       catMan->DeleteCategoryEntry("Gecko-Content-Viewers",
                                   aMimeType.get(),
                                   true);
     }
   }
 }
 
 nsresult
--- a/dom/push/PushNotifier.cpp
+++ b/dom/push/PushNotifier.cpp
@@ -308,24 +308,24 @@ PushDispatcher::DoNotifyObservers(nsISup
     mozilla::services::GetObserverService();
   if (!obsService) {
     return NS_ERROR_FAILURE;
   }
   // If there's a service for this push category, make sure it is alive.
   nsCOMPtr<nsICategoryManager> catMan =
     do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
   if (catMan) {
-    nsCString contractId;
+    nsXPIDLCString contractId;
     nsresult rv = catMan->GetCategoryEntry("push",
                                            mScope.BeginReading(),
                                            getter_Copies(contractId));
     if (NS_SUCCEEDED(rv)) {
       // Ensure the service is created - we don't need to do anything with
       // it though - we assume the service constructor attaches a listener.
-      nsCOMPtr<nsISupports> service = do_GetService(contractId.get());
+      nsCOMPtr<nsISupports> service = do_GetService(contractId);
     }
   }
   return obsService->NotifyObservers(aSubject, aTopic,
                                      NS_ConvertUTF8toUTF16(mScope).get());
 }
 
 PushMessageDispatcher::PushMessageDispatcher(const nsACString& aScope,
                                              nsIPrincipal* aPrincipal,
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -111,18 +111,18 @@ NS_IMETHODIMP nsReadConfig::Observe(nsIS
     }
     return rv;
 }
 
 
 nsresult nsReadConfig::readConfigFile()
 {
     nsresult rv = NS_OK;
-    nsCString lockFileName;
-    nsCString lockVendor;
+    nsXPIDLCString lockFileName;
+    nsXPIDLCString lockVendor;
     uint32_t fileNameLen = 0;
 
     nsCOMPtr<nsIPrefBranch> defaultPrefBranch;
     nsCOMPtr<nsIPrefService> prefService =
         do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
     if (NS_FAILED(rv))
         return rv;
 
@@ -188,38 +188,38 @@ nsresult nsReadConfig::readConfigFile()
         return NS_ERROR_FAILURE;
 
 
     rv = prefBranch->GetCharPref("general.config.vendor",
                                   getter_Copies(lockVendor));
     // If vendor is not nullptr, do this check
     if (NS_SUCCEEDED(rv)) {
 
-        fileNameLen = strlen(lockFileName.get());
+        fileNameLen = strlen(lockFileName);
 
         // lockVendor and lockFileName should be the same with the addtion of
         // .cfg to the filename by checking this post reading of the cfg file
         // this value can be set within the cfg file adding a level of security.
 
-        if (PL_strncmp(lockFileName.get(), lockVendor.get(), fileNameLen - 4) != 0)
+        if (PL_strncmp(lockFileName, lockVendor, fileNameLen - 4) != 0)
             return NS_ERROR_FAILURE;
     }
 
     // get the value of the autoconfig url
-    nsCString urlName;
+    nsXPIDLCString urlName;
     rv = prefBranch->GetCharPref("autoadmin.global_config_url",
                                   getter_Copies(urlName));
     if (NS_SUCCEEDED(rv) && !urlName.IsEmpty()) {
 
         // Instantiating nsAutoConfig object if the pref is present
         mAutoConfig = do_CreateInstance(NS_AUTOCONFIG_CONTRACTID, &rv);
         if (NS_FAILED(rv))
             return NS_ERROR_OUT_OF_MEMORY;
 
-        rv = mAutoConfig->SetConfigURL(urlName.get());
+        rv = mAutoConfig->SetConfigURL(urlName);
         if (NS_FAILED(rv))
             return NS_ERROR_FAILURE;
 
     }
 
     return NS_OK;
 } // ReadConfigFile
 
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -131,22 +131,21 @@ gfxSVGGlyphs::FindOrCreateGlyphsDocument
 
     return result;
 }
 
 nsresult
 gfxSVGGlyphsDocument::SetupPresentation()
 {
     nsCOMPtr<nsICategoryManager> catMan = do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
-    nsCString contractId;
+    nsXPIDLCString contractId;
     nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", "image/svg+xml", getter_Copies(contractId));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsCOMPtr<nsIDocumentLoaderFactory> docLoaderFactory =
-      do_GetService(contractId.get());
+    nsCOMPtr<nsIDocumentLoaderFactory> docLoaderFactory = do_GetService(contractId);
     NS_ASSERTION(docLoaderFactory, "Couldn't get DocumentLoaderFactory");
 
     nsCOMPtr<nsIContentViewer> viewer;
     rv = docLoaderFactory->CreateInstanceForDocument(nullptr, mDocument, nullptr, getter_AddRefs(viewer));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = viewer->Init(nullptr, gfx::IntRect(0, 0, 1000, 1000));
     if (NS_SUCCEEDED(rv)) {
--- a/image/SVGDocumentWrapper.cpp
+++ b/image/SVGDocumentWrapper.cpp
@@ -326,22 +326,22 @@ SVGDocumentWrapper::SetupViewer(nsIReque
   nsCOMPtr<nsILoadGroup> newLoadGroup =
         do_CreateInstance(NS_LOADGROUP_CONTRACTID);
   NS_ENSURE_TRUE(newLoadGroup, NS_ERROR_OUT_OF_MEMORY);
   newLoadGroup->SetLoadGroup(loadGroup);
 
   nsCOMPtr<nsICategoryManager> catMan =
     do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
   NS_ENSURE_TRUE(catMan, NS_ERROR_NOT_AVAILABLE);
-  nsCString contractId;
+  nsXPIDLCString contractId;
   nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", IMAGE_SVG_XML,
                                          getter_Copies(contractId));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIDocumentLoaderFactory> docLoaderFactory =
-    do_GetService(contractId.get());
+    do_GetService(contractId);
   NS_ENSURE_TRUE(docLoaderFactory, NS_ERROR_NOT_AVAILABLE);
 
   nsCOMPtr<nsIContentViewer> viewer;
   nsCOMPtr<nsIStreamListener> listener;
   rv = docLoaderFactory->CreateInstance("external-resource", chan,
                                         newLoadGroup,
                                         NS_LITERAL_CSTRING(IMAGE_SVG_XML),
                                         nullptr, nullptr,
--- a/intl/strres/nsStringBundle.cpp
+++ b/intl/strres/nsStringBundle.cpp
@@ -665,17 +665,17 @@ nsStringBundleService::FormatWithBundle(
 NS_IMETHODIMP
 nsStringBundleService::FormatStatusMessage(nsresult aStatus,
                                            const char16_t* aStatusArg,
                                            nsAString& result)
 {
   nsresult rv;
   uint32_t i, argCount = 0;
   nsCOMPtr<nsIStringBundle> bundle;
-  nsCString stringBundleURL;
+  nsXPIDLCString stringBundleURL;
 
   // XXX hack for mailnews who has already formatted their messages:
   if (aStatus == NS_OK && aStatusArg) {
     result.Assign(aStatusArg);
     return NS_OK;
   }
 
   if (aStatus == NS_OK) {
@@ -708,17 +708,17 @@ nsStringBundleService::FormatStatusMessa
       offset = pos + 1;
     }
   }
 
   // find the string bundle for the error's module:
   rv = mErrorService->GetErrorStringBundle(NS_ERROR_GET_MODULE(aStatus),
                                            getter_Copies(stringBundleURL));
   if (NS_SUCCEEDED(rv)) {
-    getStringBundle(stringBundleURL.get(), getter_AddRefs(bundle));
+    getStringBundle(stringBundleURL, getter_AddRefs(bundle));
     rv = FormatWithBundle(bundle, aStatus, argCount, argArray, result);
   }
   if (NS_FAILED(rv)) {
     getStringBundle(GLOBAL_PROPERTIES, getter_AddRefs(bundle));
     rv = FormatWithBundle(bundle, aStatus, argCount, argArray, result);
   }
 
 done:
--- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp
@@ -328,23 +328,23 @@ XPCNativeInterface::NewInstance(nsIInter
             cur->SetIndexInInterface(realTotalCount);
             ++realTotalCount;
         }
     }
 
     if (!failed) {
         for (i = 0; i < constCount; i++) {
             RootedValue constant(cx);
-            nsCString namestr;
+            nsXPIDLCString namestr;
             if (NS_FAILED(aInfo->GetConstant(i, &constant, getter_Copies(namestr)))) {
                 failed = true;
                 break;
             }
 
-            str = JS_AtomizeAndPinString(cx, namestr.get());
+            str = JS_AtomizeAndPinString(cx, namestr);
             if (!str) {
                 NS_ERROR("bad constant name");
                 failed = true;
                 break;
             }
             jsid name = INTERNED_STRING_TO_JSID(cx, str);
 
             // XXX need better way to find dups
--- a/modules/libpref/nsPrefBranch.cpp
+++ b/modules/libpref/nsPrefBranch.cpp
@@ -836,28 +836,28 @@ nsPrefBranch::RemoveExpiredCallback(Pref
 nsresult
 nsPrefBranch::GetDefaultFromPropertiesFile(const char *aPrefName,
                                            nsAString& aReturn)
 {
   nsresult rv;
 
   // the default value contains a URL to a .properties file
 
-  nsCString propertyFileURL;
+  nsXPIDLCString propertyFileURL;
   rv = PREF_CopyCharPref(aPrefName, getter_Copies(propertyFileURL), true);
   if (NS_FAILED(rv))
     return rv;
 
   nsCOMPtr<nsIStringBundleService> bundleService =
     mozilla::services::GetStringBundleService();
   if (!bundleService)
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIStringBundle> bundle;
-  rv = bundleService->CreateBundle(propertyFileURL.get(),
+  rv = bundleService->CreateBundle(propertyFileURL,
                                    getter_AddRefs(bundle));
   if (NS_FAILED(rv))
     return rv;
 
   return bundle->GetStringFromName(aPrefName, aReturn);
 }
 
 nsPrefBranch::PrefName
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -779,29 +779,29 @@ nsFtpState::S_pass() {
 
     mResponseMsg = "";
 
     if (mAnonymous) {
         if (!mPassword.IsEmpty()) {
             // XXX Is UTF-8 the best choice?
             AppendUTF16toUTF8(mPassword, passwordStr);
         } else {
-            nsCString anonPassword;
+            nsXPIDLCString anonPassword;
             bool useRealEmail = false;
             nsCOMPtr<nsIPrefBranch> prefs =
                     do_GetService(NS_PREFSERVICE_CONTRACTID);
             if (prefs) {
                 rv = prefs->GetBoolPref("advanced.mailftp", &useRealEmail);
                 if (NS_SUCCEEDED(rv) && useRealEmail) {
                     prefs->GetCharPref("network.ftp.anonymous_password",
                                        getter_Copies(anonPassword));
                 }
             }
             if (!anonPassword.IsEmpty()) {
-                passwordStr.AppendASCII(anonPassword.get());
+                passwordStr.AppendASCII(anonPassword);
             } else {
                 // We need to default to a valid email address - bug 101027
                 // example.com is reserved (rfc2606), so use that
                 passwordStr.AppendLiteral("mozilla@example.com");
             }
         }
     } else {
         if (mPassword.IsEmpty() || mRetryPass) {
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -1346,59 +1346,59 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
 
     if (PREF_CHANGED(HTTP_PREF("qos"))) {
         rv = prefs->GetIntPref(HTTP_PREF("qos"), &val);
         if (NS_SUCCEEDED(rv))
             mQoSBits = (uint8_t) clamped(val, 0, 0xff);
     }
 
     if (PREF_CHANGED(HTTP_PREF("accept.default"))) {
-        nsCString accept;
+        nsXPIDLCString accept;
         rv = prefs->GetCharPref(HTTP_PREF("accept.default"),
                                   getter_Copies(accept));
         if (NS_SUCCEEDED(rv)) {
-            rv = SetAccept(accept.get());
+            rv = SetAccept(accept);
             MOZ_ASSERT(NS_SUCCEEDED(rv));
         }
     }
 
     if (PREF_CHANGED(HTTP_PREF("accept-encoding"))) {
-        nsCString acceptEncodings;
+        nsXPIDLCString acceptEncodings;
         rv = prefs->GetCharPref(HTTP_PREF("accept-encoding"),
                                   getter_Copies(acceptEncodings));
         if (NS_SUCCEEDED(rv)) {
-            rv = SetAcceptEncodings(acceptEncodings.get(), false);
+            rv = SetAcceptEncodings(acceptEncodings, false);
             MOZ_ASSERT(NS_SUCCEEDED(rv));
         }
     }
 
     if (PREF_CHANGED(HTTP_PREF("accept-encoding.secure"))) {
-        nsCString acceptEncodings;
+        nsXPIDLCString acceptEncodings;
         rv = prefs->GetCharPref(HTTP_PREF("accept-encoding.secure"),
                                   getter_Copies(acceptEncodings));
         if (NS_SUCCEEDED(rv)) {
-            rv = SetAcceptEncodings(acceptEncodings.get(), true);
+            rv = SetAcceptEncodings(acceptEncodings, true);
             MOZ_ASSERT(NS_SUCCEEDED(rv));
         }
     }
 
     if (PREF_CHANGED(HTTP_PREF("default-socket-type"))) {
-        nsCString sval;
+        nsXPIDLCString sval;
         rv = prefs->GetCharPref(HTTP_PREF("default-socket-type"),
                                 getter_Copies(sval));
         if (NS_SUCCEEDED(rv)) {
             if (sval.IsEmpty())
                 mDefaultSocketType.Adopt(nullptr);
             else {
                 // verify that this socket type is actually valid
                 nsCOMPtr<nsISocketProviderService> sps(
                         do_GetService(NS_SOCKETPROVIDERSERVICE_CONTRACTID));
                 if (sps) {
                     nsCOMPtr<nsISocketProvider> sp;
-                    rv = sps->GetSocketProvider(sval.get(), getter_AddRefs(sp));
+                    rv = sps->GetSocketProvider(sval, getter_AddRefs(sp));
                     if (NS_SUCCEEDED(rv)) {
                         // OK, this looks like a valid socket provider.
                         mDefaultSocketType.Assign(sval);
                     }
                 }
             }
         }
     }
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -680,17 +680,17 @@ nsIndexedToHTML::OnIndexAvailable(nsIReq
     if (!aIndex)
         return NS_ERROR_NULL_POINTER;
 
     nsCString pushBuffer;
     pushBuffer.AppendLiteral("<tr");
 
     // We don't know the file's character set yet, so retrieve the raw bytes
     // which will be decoded by the HTML parser.
-    nsCString loc;
+    nsXPIDLCString loc;
     aIndex->GetLocation(getter_Copies(loc));
 
     // Adjust the length in case unescaping shortened the string.
     loc.Truncate(nsUnescapeCount(loc.BeginWriting()));
 
     if (loc.IsEmpty()) {
         return NS_ERROR_ILLEGAL_VALUE;
     }
@@ -710,17 +710,17 @@ nsIndexedToHTML::OnIndexAvailable(nsIReq
         case nsIDirIndex::TYPE_DIRECTORY:
             pushBuffer.Append('1');
             break;
         default:
             pushBuffer.Append('2');
             break;
     }
     nsCString escaped;
-    escaped.Adopt(nsEscapeHTML(loc.get()));
+    escaped.Adopt(nsEscapeHTML(loc));
     pushBuffer.Append(escaped);
 
     pushBuffer.AppendLiteral("\"><table class=\"ellipsis\"><tbody><tr><td><a class=\"");
     switch (type) {
         case nsIDirIndex::TYPE_DIRECTORY:
             pushBuffer.AppendLiteral("dir");
             break;
         case nsIDirIndex::TYPE_SYMLINK:
--- a/rdf/base/nsInMemoryDataSource.cpp
+++ b/rdf/base/nsInMemoryDataSource.cpp
@@ -799,37 +799,37 @@ InMemoryDataSource::LogOperation(const c
                                  nsIRDFResource* aSource,
                                  nsIRDFResource* aProperty,
                                  nsIRDFNode* aTarget,
                                  bool aTruthValue)
 {
     if (! MOZ_LOG_TEST(gLog, LogLevel::Debug))
         return;
 
-    nsCString uri;
+    nsXPIDLCString uri;
     aSource->GetValue(getter_Copies(uri));
     MOZ_LOG(gLog, LogLevel::Debug,
            ("InMemoryDataSource(%p): %s", this, aOperation));
 
     MOZ_LOG(gLog, LogLevel::Debug,
-           ("  [(%p)%s]--", aSource, uri.get()));
+           ("  [(%p)%s]--", aSource, (const char*) uri));
 
     aProperty->GetValue(getter_Copies(uri));
 
     char tv = (aTruthValue ? '-' : '!');
     MOZ_LOG(gLog, LogLevel::Debug,
-           ("  --%c[(%p)%s]--", tv, aProperty, uri.get()));
+           ("  --%c[(%p)%s]--", tv, aProperty, (const char*) uri));
 
     nsCOMPtr<nsIRDFResource> resource;
     nsCOMPtr<nsIRDFLiteral> literal;
 
     if ((resource = do_QueryInterface(aTarget)) != nullptr) {
         resource->GetValue(getter_Copies(uri));
         MOZ_LOG(gLog, LogLevel::Debug,
-           ("  -->[(%p)%s]", aTarget, uri.get()));
+           ("  -->[(%p)%s]", aTarget, (const char*) uri));
     }
     else if ((literal = do_QueryInterface(aTarget)) != nullptr) {
         nsString value;
         literal->GetValue(getter_Copies(value));
         MOZ_LOG(gLog, LogLevel::Debug,
            ("  -->(\"%s\")\n", NS_ConvertUTF16toUTF8(value).get()));
     }
     else {
--- a/rdf/base/nsRDFContentSink.cpp
+++ b/rdf/base/nsRDFContentSink.cpp
@@ -310,20 +310,20 @@ RDFContentSinkImpl::~RDFContentSinkImpl(
             RDFContentSinkState state;
             RDFContentSinkParseMode parseMode;
             PopContext(resource, state, parseMode);
 
             // print some fairly useless debugging info
             // XXX we should save line numbers on the context stack: this'd
             // be about 1000x more helpful.
             if (resource && MOZ_LOG_TEST(gLog, LogLevel::Debug)) {
-                nsCString uri;
+                nsXPIDLCString uri;
                 resource->GetValue(getter_Copies(uri));
                 MOZ_LOG(gLog, LogLevel::Debug,
-                       ("rdfxml:   uri=%s", uri.get()));
+                       ("rdfxml:   uri=%s", (const char*) uri));
             }
 
             NS_IF_RELEASE(resource);
         }
 
         delete mContextStack;
     }
     free(mText);
--- a/rdf/base/nsRDFService.cpp
+++ b/rdf/base/nsRDFService.cpp
@@ -1186,48 +1186,46 @@ NS_IMETHODIMP
 RDFServiceImpl::RegisterDataSource(nsIRDFDataSource* aDataSource, bool aReplace)
 {
     NS_PRECONDITION(aDataSource != nullptr, "null ptr");
     if (! aDataSource)
         return NS_ERROR_NULL_POINTER;
 
     nsresult rv;
 
-    nsCString uri;
+    nsXPIDLCString uri;
     rv = aDataSource->GetURI(getter_Copies(uri));
     if (NS_FAILED(rv)) return rv;
 
     PLHashEntry** hep =
-      PL_HashTableRawLookup(mNamedDataSources,
-                            (*mNamedDataSources->keyHash)(uri.get()),
-                            uri.get());
+        PL_HashTableRawLookup(mNamedDataSources, (*mNamedDataSources->keyHash)(uri), uri);
 
     if (*hep) {
         if (! aReplace)
             return NS_ERROR_FAILURE; // already registered
 
         // N.B., we only hold a weak reference to the datasource, so
         // just replace the old with the new and don't touch any
         // refcounts.
         MOZ_LOG(gLog, LogLevel::Debug,
                ("rdfserv    replace-datasource [%p] <-- [%p] %s",
-                (*hep)->value, aDataSource, uri.get()));
+                (*hep)->value, aDataSource, (const char*) uri));
 
         (*hep)->value = aDataSource;
     }
     else {
-        const char* key = PL_strdup(uri.get());
+        const char* key = PL_strdup(uri);
         if (! key)
             return NS_ERROR_OUT_OF_MEMORY;
 
         PL_HashTableAdd(mNamedDataSources, key, aDataSource);
 
         MOZ_LOG(gLog, LogLevel::Debug,
                ("rdfserv   register-datasource [%p] %s",
-                aDataSource, uri.get()));
+                aDataSource, (const char*) uri));
 
         // N.B., we only hold a weak reference to the datasource, so don't
         // addref.
     }
 
     return NS_OK;
 }
 
--- a/toolkit/components/startup/nsUserInfoUnix.cpp
+++ b/toolkit/components/startup/nsUserInfoUnix.cpp
@@ -137,29 +137,29 @@ nsUserInfo::GetDomain(char * *aDomain)
 NS_IMETHODIMP
 nsUserInfo::GetEmailAddress(char * *aEmailAddress)
 {
     // use username + "@" + domain for the email address
 
     nsresult rv;
 
     nsAutoCString emailAddress;
-    nsCString username;
-    nsCString domain;
+    nsXPIDLCString username;
+    nsXPIDLCString domain;
 
     rv = GetUsername(getter_Copies(username));
     if (NS_FAILED(rv)) return rv;
 
     rv = GetDomain(getter_Copies(domain));
     if (NS_FAILED(rv)) return rv;
 
     if (!username.IsEmpty() && !domain.IsEmpty()) {
-        emailAddress = username.get();
+        emailAddress = (const char *)username;
         emailAddress += "@";
-        emailAddress += domain.get();
+        emailAddress += (const char *)domain;
     }
     else {
         return NS_ERROR_FAILURE;
     }
 
     *aEmailAddress = ToNewCString(emailAddress);
 
     return NS_OK;
--- a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
@@ -311,20 +311,20 @@ nsUrlClassifierUtils::GetTelemetryProvid
 NS_IMETHODIMP
 nsUrlClassifierUtils::GetProtocolVersion(const nsACString& aProvider,
                                          nsACString& aVersion)
 {
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
   if (prefBranch) {
       nsPrintfCString prefName("browser.safebrowsing.provider.%s.pver",
                                nsCString(aProvider).get());
-      nsCString version;
+      nsXPIDLCString version;
       nsresult rv = prefBranch->GetCharPref(prefName.get(), getter_Copies(version));
 
-      aVersion = NS_SUCCEEDED(rv) ? version.get() : DEFAULT_PROTOCOL_VERSION;
+      aVersion = NS_SUCCEEDED(rv) ? version : DEFAULT_PROTOCOL_VERSION;
   } else {
       aVersion = DEFAULT_PROTOCOL_VERSION;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/toolkit/xre/nsAppStartupNotifier.cpp
+++ b/toolkit/xre/nsAppStartupNotifier.cpp
@@ -39,32 +39,32 @@ NS_IMETHODIMP nsAppStartupNotifier::Obse
     nsCOMPtr<nsISupports> entry;
     while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
         nsCOMPtr<nsISupportsCString> category = do_QueryInterface(entry, &rv);
 
         if (NS_SUCCEEDED(rv)) {
             nsAutoCString categoryEntry;
             rv = category->GetData(categoryEntry);
 
-            nsCString contractId;
+            nsXPIDLCString contractId;
             categoryManager->GetCategoryEntry(aTopic,
                                               categoryEntry.get(),
                                               getter_Copies(contractId));
 
             if (NS_SUCCEEDED(rv)) {
 
                 // If we see the word "service," in the beginning
                 // of the contractId then we create it as a service
                 // if not we do a createInstance
 
                 nsCOMPtr<nsISupports> startupInstance;
                 if (Substring(contractId, 0, 8).EqualsLiteral("service,"))
                     startupInstance = do_GetService(contractId.get() + 8, &rv);
                 else
-                    startupInstance = do_CreateInstance(contractId.get(), &rv);
+                    startupInstance = do_CreateInstance(contractId, &rv);
 
                 if (NS_SUCCEEDED(rv)) {
                     // Try to QI to nsIObserver
                     nsCOMPtr<nsIObserver> startupObserver =
                         do_QueryInterface(startupInstance, &rv);
                     if (NS_SUCCEEDED(rv)) {
                         rv = startupObserver->Observe(nullptr, aTopic, nullptr);
 
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -451,27 +451,27 @@ nsresult nsDocumentOpenInfo::DispatchCon
       //
       // Third step: Try to find a content listener that has not yet had
       // the chance to register, as it is contained in a not-yet-loaded
       // module, but which has registered a contract ID.
       //
       nsCOMPtr<nsICategoryManager> catman =
         do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
       if (catman) {
-        nsCString contractidString;
+        nsXPIDLCString contractidString;
         rv = catman->GetCategoryEntry(NS_CONTENT_LISTENER_CATEGORYMANAGER_ENTRY,
                                       mContentType.get(),
                                       getter_Copies(contractidString));
         if (NS_SUCCEEDED(rv) && !contractidString.IsEmpty()) {
           LOG(("  Listener contractid for '%s' is '%s'",
                mContentType.get(), contractidString.get()));
 
-          listener = do_CreateInstance(contractidString.get());
+          listener = do_CreateInstance(contractidString);
           LOG(("  Listener from category manager: 0x%p", listener.get()));
-
+          
           if (listener && TryContentListener(listener, aChannel)) {
             LOG(("  Listener from category manager likes this type"));
             return NS_OK;
           }
         }
       }
 
       //
--- a/widget/cocoa/nsClipboard.mm
+++ b/widget/cocoa/nsClipboard.mm
@@ -200,17 +200,17 @@ nsClipboard::TransferableFromPasteboard(
   uint32_t flavorCount;
   flavorList->GetLength(&flavorCount);
 
   for (uint32_t i = 0; i < flavorCount; i++) {
     nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, i);
     if (!currentFlavor)
       continue;
 
-    nsCString flavorStr;
+    nsXPIDLCString flavorStr;
     currentFlavor->ToString(getter_Copies(flavorStr)); // i has a flavr
 
     // printf("looking for clipboard data of type %s\n", flavorStr.get());
 
     NSString *pboardType = nil;
     if (nsClipboard::IsStringType(flavorStr, &pboardType)) {
       NSString* pString = [cocoaPasteboard stringForType:pboardType];
       if (!pString)
@@ -228,32 +228,32 @@ nsClipboard::TransferableFromPasteboard(
       if (!clipboardDataPtr) {
         [pboardType release];
         return NS_ERROR_OUT_OF_MEMORY;
       }
       [stringData getBytes:clipboardDataPtr];
 
       // The DOM only wants LF, so convert from MacOS line endings to DOM line endings.
       int32_t signedDataLength = dataLength;
-      nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks(flavorStr.get(), &clipboardDataPtr, &signedDataLength);
+      nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks(flavorStr, &clipboardDataPtr, &signedDataLength);
       dataLength = signedDataLength;
 
       // skip BOM (Byte Order Mark to distinguish little or big endian)      
       char16_t* clipboardDataPtrNoBOM = (char16_t*)clipboardDataPtr;
       if ((dataLength > 2) &&
           ((clipboardDataPtrNoBOM[0] == 0xFEFF) ||
            (clipboardDataPtrNoBOM[0] == 0xFFFE))) {
         dataLength -= sizeof(char16_t);
         clipboardDataPtrNoBOM += 1;
       }
 
       nsCOMPtr<nsISupports> genericDataWrapper;
-      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(), clipboardDataPtrNoBOM, dataLength,
+      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, clipboardDataPtrNoBOM, dataLength,
                                                  getter_AddRefs(genericDataWrapper));
-      aTransferable->SetTransferData(flavorStr.get(), genericDataWrapper, dataLength);
+      aTransferable->SetTransferData(flavorStr, genericDataWrapper, dataLength);
       free(clipboardDataPtr);
       break;
     }
     else if (flavorStr.EqualsLiteral(kCustomTypesMime)) {
       NSString* type =
         [cocoaPasteboard availableTypeFromArray:
           [NSArray arrayWithObject:
             [UTIHelper stringFromPboardType:kMozCustomTypesPboardType]]];
@@ -270,20 +270,20 @@ nsClipboard::TransferableFromPasteboard(
       void* clipboardDataPtr = malloc(dataLength);
       if (!clipboardDataPtr) {
         [pboardType release];
         return NS_ERROR_OUT_OF_MEMORY;
       }
       [pasteboardData getBytes:clipboardDataPtr];
 
       nsCOMPtr<nsISupports> genericDataWrapper;
-      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(), clipboardDataPtr, dataLength,
+      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, clipboardDataPtr, dataLength,
                                                  getter_AddRefs(genericDataWrapper));
 
-      aTransferable->SetTransferData(flavorStr.get(), genericDataWrapper, dataLength);
+      aTransferable->SetTransferData(flavorStr, genericDataWrapper, dataLength);
       free(clipboardDataPtr);
     }
     else if (flavorStr.EqualsLiteral(kJPEGImageMime) ||
              flavorStr.EqualsLiteral(kJPGImageMime) ||
              flavorStr.EqualsLiteral(kPNGImageMime) ||
              flavorStr.EqualsLiteral(kGIFImageMime)) {
       // Figure out if there's data on the pasteboard we can grab (sanity check)
       NSString* type =
@@ -334,17 +334,17 @@ nsClipboard::TransferableFromPasteboard(
       bool successfullyConverted = CGImageDestinationFinalize(dest);
 
       if (successfullyConverted) {
         // Put the converted data in a form Gecko can understand
         nsCOMPtr<nsIInputStream> byteStream;
         NS_NewByteInputStream(getter_AddRefs(byteStream), (const char*)[encodedData bytes],
                                    [encodedData length], NS_ASSIGNMENT_COPY);
   
-        aTransferable->SetTransferData(flavorStr.get(), byteStream, sizeof(nsIInputStream*));
+        aTransferable->SetTransferData(flavorStr, byteStream, sizeof(nsIInputStream*));
       }
 
       if (dest)
         CFRelease(dest);
       if (source)
         CFRelease(source);
       
       if (successfullyConverted)
@@ -391,24 +391,24 @@ nsClipboard::GetNativeClipboardData(nsIT
   if (mCachedClipboard == aWhichClipboard &&
       mChangeCount == [cocoaPasteboard changeCount]) {
     if (mTransferable) {
       for (uint32_t i = 0; i < flavorCount; i++) {
         nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, i);
         if (!currentFlavor)
           continue;
 
-        nsCString flavorStr;
+        nsXPIDLCString flavorStr;
         currentFlavor->ToString(getter_Copies(flavorStr));
 
         nsCOMPtr<nsISupports> dataSupports;
         uint32_t dataSize = 0;
-        rv = mTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(dataSupports), &dataSize);
+        rv = mTransferable->GetTransferData(flavorStr, getter_AddRefs(dataSupports), &dataSize);
         if (NS_SUCCEEDED(rv)) {
-          aTransferable->SetTransferData(flavorStr.get(), dataSupports, dataSize);
+          aTransferable->SetTransferData(flavorStr, dataSupports, dataSize);
           return NS_OK; // maybe try to fill in more types? Is there a point?
         }
       }
     }
   } else {
     EmptyClipboard(aWhichClipboard);
   }
 
@@ -529,29 +529,29 @@ nsClipboard::PasteboardDictFromTransfera
 
   uint32_t flavorCount;
   flavorList->GetLength(&flavorCount);
   for (uint32_t i = 0; i < flavorCount; i++) {
     nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, i);
     if (!currentFlavor)
       continue;
 
-    nsCString flavorStr;
+    nsXPIDLCString flavorStr;
     currentFlavor->ToString(getter_Copies(flavorStr));
 
     MOZ_LOG(sCocoaLog, LogLevel::Info, ("writing out clipboard data of type %s (%d)\n", flavorStr.get(), i));
 
     NSString *pboardType = nil;
 
     if (nsClipboard::IsStringType(flavorStr, &pboardType)) {
       void* data = nullptr;
       uint32_t dataSize = 0;
       nsCOMPtr<nsISupports> genericDataWrapper;
-      rv = aTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(genericDataWrapper), &dataSize);
-      nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr.get(), genericDataWrapper, &data, dataSize);
+      rv = aTransferable->GetTransferData(flavorStr, getter_AddRefs(genericDataWrapper), &dataSize);
+      nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr, genericDataWrapper, &data, dataSize);
 
       NSString* nativeString;
       if (data)
         nativeString = [NSString stringWithCharacters:(const unichar*)data length:(dataSize / sizeof(char16_t))];
       else
         nativeString = [NSString string];
       
       // be nice to Carbon apps, normalize the receiver's contents using Form C.
@@ -560,33 +560,33 @@ nsClipboard::PasteboardDictFromTransfera
       [pasteboardOutputDict setObject:nativeString forKey:pboardType];
       
       free(data);
     }
     else if (flavorStr.EqualsLiteral(kCustomTypesMime)) {
       void* data = nullptr;
       uint32_t dataSize = 0;
       nsCOMPtr<nsISupports> genericDataWrapper;
-      rv = aTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(genericDataWrapper), &dataSize);
-      nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr.get(), genericDataWrapper, &data, dataSize);
+      rv = aTransferable->GetTransferData(flavorStr, getter_AddRefs(genericDataWrapper), &dataSize);
+      nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr, genericDataWrapper, &data, dataSize);
 
       if (data) {
         NSData* nativeData = [NSData dataWithBytes:data length:dataSize];
         NSString* customType =
           [UTIHelper stringFromPboardType:kMozCustomTypesPboardType];
         [pasteboardOutputDict setObject:nativeData forKey:customType];
         free(data);
       }
     }
     else if (flavorStr.EqualsLiteral(kPNGImageMime) || flavorStr.EqualsLiteral(kJPEGImageMime) ||
              flavorStr.EqualsLiteral(kJPGImageMime) || flavorStr.EqualsLiteral(kGIFImageMime) ||
              flavorStr.EqualsLiteral(kNativeImageMime)) {
       uint32_t dataSize = 0;
       nsCOMPtr<nsISupports> transferSupports;
-      aTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(transferSupports), &dataSize);
+      aTransferable->GetTransferData(flavorStr, getter_AddRefs(transferSupports), &dataSize);
       nsCOMPtr<nsISupportsInterfacePointer> ptrPrimitive(do_QueryInterface(transferSupports));
       if (!ptrPrimitive)
         continue;
 
       nsCOMPtr<nsISupports> primitiveData;
       ptrPrimitive->GetData(getter_AddRefs(primitiveData));
 
       nsCOMPtr<imgIContainer> image(do_QueryInterface(primitiveData));
@@ -631,17 +631,17 @@ nsClipboard::PasteboardDictFromTransfera
       [pasteboardOutputDict setObject:(NSMutableData*)tiffData
                                forKey:tiffType];
       if (tiffData)
         CFRelease(tiffData);
     }
     else if (flavorStr.EqualsLiteral(kFileMime)) {
       uint32_t len = 0;
       nsCOMPtr<nsISupports> genericFile;
-      rv = aTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(genericFile), &len);
+      rv = aTransferable->GetTransferData(flavorStr, getter_AddRefs(genericFile), &len);
       if (NS_FAILED(rv)) {
         continue;
       }
 
       nsCOMPtr<nsIFile> file(do_QueryInterface(genericFile));
       if (!file) {
         nsCOMPtr<nsISupportsInterfacePointer> ptr(do_QueryInterface(genericFile));
 
@@ -678,17 +678,17 @@ nsClipboard::PasteboardDictFromTransfera
       [pasteboardOutputDict setObject:[NSArray arrayWithObject:@""]
                                forKey:urlPromise];
       [pasteboardOutputDict setObject:[NSArray arrayWithObject:@""]
                                forKey:urlPromiseContent];
     }
     else if (flavorStr.EqualsLiteral(kURLMime)) {
       uint32_t len = 0;
       nsCOMPtr<nsISupports> genericURL;
-      rv = aTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(genericURL), &len);
+      rv = aTransferable->GetTransferData(flavorStr, getter_AddRefs(genericURL), &len);
       nsCOMPtr<nsISupportsString> urlObject(do_QueryInterface(genericURL));
 
       nsAutoString url;
       urlObject->GetData(url);
 
       NSString* nativeTitle = nil;
 
       // A newline embedded in the URL means that the form is actually URL +
--- a/widget/cocoa/nsDragService.mm
+++ b/widget/cocoa/nsDragService.mm
@@ -391,37 +391,37 @@ nsDragService::GetData(nsITransferable* 
   // when the drag started if possible
   if (mDataItems) {
     nsCOMPtr<nsITransferable> currentTransferable = do_QueryElementAt(mDataItems, aItemIndex);
     if (currentTransferable) {
       for (uint32_t i = 0; i < acceptableFlavorCount; i++) {
         nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, i);
         if (!currentFlavor)
           continue;
-        nsCString flavorStr;
+        nsXPIDLCString flavorStr;
         currentFlavor->ToString(getter_Copies(flavorStr));
 
         nsCOMPtr<nsISupports> dataSupports;
         uint32_t dataSize = 0;
-        rv = currentTransferable->GetTransferData(flavorStr.get(), getter_AddRefs(dataSupports), &dataSize);
+        rv = currentTransferable->GetTransferData(flavorStr, getter_AddRefs(dataSupports), &dataSize);
         if (NS_SUCCEEDED(rv)) {
-          aTransferable->SetTransferData(flavorStr.get(), dataSupports, dataSize);
+          aTransferable->SetTransferData(flavorStr, dataSupports, dataSize);
           return NS_OK; // maybe try to fill in more types? Is there a point?
         }
       }
     }
   }
 
   // now check the actual clipboard for data
   for (uint32_t i = 0; i < acceptableFlavorCount; i++) {
     nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, i);
     if (!currentFlavor)
       continue;
 
-    nsCString flavorStr;
+    nsXPIDLCString flavorStr;
     currentFlavor->ToString(getter_Copies(flavorStr));
 
     MOZ_LOG(sCocoaLog, LogLevel::Info, ("nsDragService::GetData: looking for clipboard data of type %s\n", flavorStr.get()));
 
     NSArray* droppedItems = [globalDragPboard pasteboardItems];
     if (!droppedItems) {
       continue;
     }
@@ -450,17 +450,17 @@ nsDragService::GetData(nsITransferable* 
       clipboardDataPtr[stringLength] = 0; // null terminate
 
       nsCOMPtr<nsIFile> file;
       rv = NS_NewLocalFile(nsDependentString(clipboardDataPtr), true, getter_AddRefs(file));
       free(clipboardDataPtr);
       if (NS_FAILED(rv))
         continue;
 
-      aTransferable->SetTransferData(flavorStr.get(), file, dataLength);
+      aTransferable->SetTransferData(flavorStr, file, dataLength);
       
       break;
     }
     else if (flavorStr.EqualsLiteral(kCustomTypesMime)) {
       NSString* availableType =
         [item availableTypeFromArray:
           [NSArray arrayWithObject:kMozCustomTypesPboardType]];
       if (!availableType || !IsValidType(availableType, false)) {
@@ -474,20 +474,20 @@ nsDragService::GetData(nsITransferable* 
       unsigned int dataLength = [pasteboardData length];
       void* clipboardDataPtr = malloc(dataLength);
       if (!clipboardDataPtr) {
         return NS_ERROR_OUT_OF_MEMORY;
       }
       [pasteboardData getBytes:clipboardDataPtr];
 
       nsCOMPtr<nsISupports> genericDataWrapper;
-      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(), clipboardDataPtr, dataLength,
+      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, clipboardDataPtr, dataLength,
                                                  getter_AddRefs(genericDataWrapper));
 
-      aTransferable->SetTransferData(flavorStr.get(), genericDataWrapper, sizeof(nsIInputStream*));
+      aTransferable->SetTransferData(flavorStr, genericDataWrapper, sizeof(nsIInputStream*));
       free(clipboardDataPtr);
       break;
     }
 
     NSString* pString = nil;
     if (flavorStr.EqualsLiteral(kUnicodeMime)) {
       pString =
         GetStringForType(
@@ -528,32 +528,32 @@ nsDragService::GetData(nsITransferable* 
       unsigned int dataLength = [stringData length];
       void* clipboardDataPtr = malloc(dataLength);
       if (!clipboardDataPtr)
         return NS_ERROR_OUT_OF_MEMORY;
       [stringData getBytes:clipboardDataPtr];
 
       // The DOM only wants LF, so convert from MacOS line endings to DOM line endings.
       int32_t signedDataLength = dataLength;
-      nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks(flavorStr.get(), &clipboardDataPtr, &signedDataLength);
+      nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks(flavorStr, &clipboardDataPtr, &signedDataLength);
       dataLength = signedDataLength;
 
       // skip BOM (Byte Order Mark to distinguish little or big endian)      
       char16_t* clipboardDataPtrNoBOM = (char16_t*)clipboardDataPtr;
       if ((dataLength > 2) &&
           ((clipboardDataPtrNoBOM[0] == 0xFEFF) ||
            (clipboardDataPtrNoBOM[0] == 0xFFFE))) {
         dataLength -= sizeof(char16_t);
         clipboardDataPtrNoBOM += 1;
       }
 
       nsCOMPtr<nsISupports> genericDataWrapper;
-      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(), clipboardDataPtrNoBOM, dataLength,
+      nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, clipboardDataPtrNoBOM, dataLength,
                                                  getter_AddRefs(genericDataWrapper));
-      aTransferable->SetTransferData(flavorStr.get(), genericDataWrapper, dataLength);
+      aTransferable->SetTransferData(flavorStr, genericDataWrapper, dataLength);
       free(clipboardDataPtr);
       break;
     }
 
     // We have never supported this on Mac OS X, we should someday. Normally dragging images
     // in is accomplished with a file path drag instead of the image data itself.
     /*
     if (flavorStr.EqualsLiteral(kPNGImageMime) || flavorStr.EqualsLiteral(kJPEGImageMime) ||
--- a/widget/gtk/nsClipboard.cpp
+++ b/widget/gtk/nsClipboard.cpp
@@ -168,22 +168,22 @@ nsClipboard::SetData(nsITransferable *aT
     // Add all the flavors to this widget's supported type.
     bool imagesAdded = false;
     uint32_t count;
     flavors->GetLength(&count);
     for (uint32_t i=0; i < count; i++) {
         nsCOMPtr<nsISupportsCString> flavor = do_QueryElementAt(flavors, i);
 
         if (flavor) {
-            nsCString flavorStr;
+            nsXPIDLCString flavorStr;
             flavor->ToString(getter_Copies(flavorStr));
 
             // special case text/unicode since we can handle all of
             // the string types
-            if (flavorStr.EqualsLiteral(kUnicodeMime)) {
+            if (!strcmp(flavorStr, kUnicodeMime)) {
                 gtk_target_list_add(list, gdk_atom_intern("UTF8_STRING", FALSE), 0, 0);
                 gtk_target_list_add(list, gdk_atom_intern("COMPOUND_TEXT", FALSE), 0, 0);
                 gtk_target_list_add(list, gdk_atom_intern("TEXT", FALSE), 0, 0);
                 gtk_target_list_add(list, GDK_SELECTION_TYPE_STRING, 0, 0);
                 continue;
             }
 
             if (flavorStr.EqualsLiteral(kNativeImageMime) ||
@@ -196,17 +196,17 @@ nsClipboard::SetData(nsITransferable *aT
                     // accept any writable image type
                     gtk_target_list_add_image_targets(list, 0, TRUE);
                     imagesAdded = true;
                 }
                 continue;
             }
 
             // Add this to our list of valid targets
-            GdkAtom atom = gdk_atom_intern(flavorStr.get(), FALSE);
+            GdkAtom atom = gdk_atom_intern(flavorStr, FALSE);
             gtk_target_list_add(list, atom, 0, 0);
         }
     }
     
     // Get GTK clipboard (CLIPBOARD or PRIMARY)
     GtkClipboard *gtkClipboard = gtk_clipboard_get(GetSelectionAtom(aWhichClipboard));
   
     gint numTargets;
@@ -265,22 +265,22 @@ nsClipboard::GetData(nsITransferable *aT
 
     uint32_t count;
     flavors->GetLength(&count);
     for (uint32_t i=0; i < count; i++) {
         nsCOMPtr<nsISupportsCString> currentFlavor;
         currentFlavor = do_QueryElementAt(flavors, i);
 
         if (currentFlavor) {
-            nsCString flavorStr;
+            nsXPIDLCString flavorStr;
             currentFlavor->ToString(getter_Copies(flavorStr));
 
             // Special case text/unicode since we can convert any
             // string into text/unicode
-            if (flavorStr.EqualsLiteral(kUnicodeMime)) {
+            if (!strcmp(flavorStr, kUnicodeMime)) {
                 gchar* new_text = wait_for_text(clipboard);
                 if (new_text) {
                     // Convert utf-8 into our unicode format.
                     NS_ConvertUTF8toUTF16 ucs2string(new_text);
                     data = (guchar *)ToNewUnicode(ucs2string);
                     length = ucs2string.Length() * 2;
                     g_free(new_text);
                     foundData = true;
@@ -290,51 +290,51 @@ nsClipboard::GetData(nsITransferable *aT
                 // If the type was text/unicode and we couldn't get
                 // text off the clipboard, run the next loop
                 // iteration.
                 continue;
             }
 
             // For images, we must wrap the data in an nsIInputStream then return instead of break,
             // because that code below won't help us.
-            if (flavorStr.EqualsLiteral(kJPEGImageMime) ||
-                flavorStr.EqualsLiteral(kJPGImageMime) ||
-                flavorStr.EqualsLiteral(kPNGImageMime) ||
-                flavorStr.EqualsLiteral(kGIFImageMime)) {
+            if (!strcmp(flavorStr, kJPEGImageMime) ||
+                !strcmp(flavorStr, kJPGImageMime) ||
+                !strcmp(flavorStr, kPNGImageMime) ||
+                !strcmp(flavorStr, kGIFImageMime)) {
                 // Emulate support for image/jpg
-                if (flavorStr.EqualsLiteral(kJPGImageMime)) {
+                if (!strcmp(flavorStr, kJPGImageMime)) {
                     flavorStr.Assign(kJPEGImageMime);
                 }
 
-                GdkAtom atom = gdk_atom_intern(flavorStr.get(), FALSE);
+                GdkAtom atom = gdk_atom_intern(flavorStr, FALSE);
 
                 GtkSelectionData *selectionData = wait_for_contents(clipboard, atom);
                 if (!selectionData)
                     continue;
 
                 nsCOMPtr<nsIInputStream> byteStream;
                 NS_NewByteInputStream(getter_AddRefs(byteStream), 
                                       (const char*)gtk_selection_data_get_data(selectionData),
                                       gtk_selection_data_get_length(selectionData), 
                                       NS_ASSIGNMENT_COPY);
-                aTransferable->SetTransferData(flavorStr.get(), byteStream, sizeof(nsIInputStream*));
+                aTransferable->SetTransferData(flavorStr, byteStream, sizeof(nsIInputStream*));
                 gtk_selection_data_free(selectionData);
                 return NS_OK;
             }
 
             // Get the atom for this type and try to request it off
             // the clipboard.
-            GdkAtom atom = gdk_atom_intern(flavorStr.get(), FALSE);
+            GdkAtom atom = gdk_atom_intern(flavorStr, FALSE);
             GtkSelectionData *selectionData;
             selectionData = wait_for_contents(clipboard, atom);
             if (selectionData) {
                 const guchar *clipboardData = gtk_selection_data_get_data(selectionData);
                 length = gtk_selection_data_get_length(selectionData);
                 // Special case text/html since we can convert into UCS2
-                if (flavorStr.EqualsLiteral(kHTMLMime)) {
+                if (!strcmp(flavorStr, kHTMLMime)) {
                     char16_t* htmlBody= nullptr;
                     int32_t htmlBodyLen = 0;
                     // Convert text/html into our unicode format
                     ConvertHTMLtoUCS2(const_cast<guchar*>(clipboardData), length,
                                       &htmlBody, htmlBodyLen);
                     // Try next data format?
                     if (!htmlBodyLen)
                         continue;
--- a/widget/gtk/nsColorPicker.cpp
+++ b/widget/gtk/nsColorPicker.cpp
@@ -87,17 +87,17 @@ NS_IMETHODIMP nsColorPicker::Open(nsICol
 
   if (mCallback) {
     // It means Open has already been called: this is not allowed
     NS_WARNING("mCallback is already set. Open called twice?");
     return NS_ERROR_FAILURE;
   }
   mCallback = aColorPickerShownCallback;
 
-  nsCString title;
+  nsXPIDLCString title;
   title.Adopt(ToNewUTF8String(mTitle));
   GtkWindow *parent_window = GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
   
 #if defined(ACTIVATE_GTK3_COLOR_PICKER) && GTK_CHECK_VERSION(3,4,0)
   GtkWidget* color_chooser = gtk_color_chooser_dialog_new(title, parent_window);
     
   if (parent_window) {
       gtk_window_set_destroy_with_parent(GTK_WINDOW(color_chooser), TRUE);
@@ -106,17 +106,17 @@ NS_IMETHODIMP nsColorPicker::Open(nsICol
   gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(color_chooser), FALSE);
   GdkRGBA color_rgba = convertToRgbaColor(color);    
   gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(color_chooser),
                              &color_rgba);
   
   g_signal_connect(GTK_COLOR_CHOOSER(color_chooser), "color-activated",
                    G_CALLBACK(OnColorChanged), this);
 #else
-  GtkWidget *color_chooser = gtk_color_selection_dialog_new(title.get());
+  GtkWidget *color_chooser = gtk_color_selection_dialog_new(title);
   
   if (parent_window) {
     GtkWindow *window = GTK_WINDOW(color_chooser);
     gtk_window_set_transient_for(window, parent_window);
     gtk_window_set_destroy_with_parent(window, TRUE);
   }
 
   GdkColor color_gdk = convertToGdkColor(color);
--- a/widget/gtk/nsDragService.cpp
+++ b/widget/gtk/nsDragService.cpp
@@ -730,42 +730,41 @@ nsDragService::GetData(nsITransferable *
         MOZ_LOG(sDragLm, LogLevel::Debug, ("it's a list..."));
         // find a matching flavor
         for (i = 0; i < cnt; ++i) {
             nsCOMPtr<nsISupportsCString> currentFlavor;
             currentFlavor = do_QueryElementAt(flavorList, i);
             if (!currentFlavor)
                 continue;
 
-            nsCString flavorStr;
+            nsXPIDLCString flavorStr;
             currentFlavor->ToString(getter_Copies(flavorStr));
             MOZ_LOG(sDragLm,
                    LogLevel::Debug,
-                   ("flavor is %s\n", flavorStr.get()));
+                   ("flavor is %s\n", (const char *)flavorStr));
             // get the item with the right index
             nsCOMPtr<nsITransferable> item =
                 do_QueryElementAt(mSourceDataItems, aItemIndex);
             if (!item)
                 continue;
 
             nsCOMPtr<nsISupports> data;
             uint32_t tmpDataLen = 0;
             MOZ_LOG(sDragLm, LogLevel::Debug,
                    ("trying to get transfer data for %s\n",
-                   flavorStr.get()));
-            rv = item->GetTransferData(flavorStr.get(),
+                   (const char *)flavorStr));
+            rv = item->GetTransferData(flavorStr,
                                        getter_AddRefs(data),
                                        &tmpDataLen);
             if (NS_FAILED(rv)) {
                 MOZ_LOG(sDragLm, LogLevel::Debug, ("failed.\n"));
                 continue;
             }
             MOZ_LOG(sDragLm, LogLevel::Debug, ("succeeded.\n"));
-            rv = aTransferable->SetTransferData(flavorStr.get(), data,
-                                                tmpDataLen);
+            rv = aTransferable->SetTransferData(flavorStr,data,tmpDataLen);
             if (NS_FAILED(rv)) {
                 MOZ_LOG(sDragLm,
                        LogLevel::Debug,
                        ("fail to set transfer data into transferable!\n"));
                 continue;
             }
             // ok, we got the data
             return NS_OK;
@@ -777,36 +776,36 @@ nsDragService::GetData(nsITransferable *
     // Now walk down the list of flavors. When we find one that is
     // actually present, copy out the data into the transferable in that
     // format. SetTransferData() implicitly handles conversions.
     for ( i = 0; i < cnt; ++i ) {
         nsCOMPtr<nsISupportsCString> currentFlavor;
         currentFlavor = do_QueryElementAt(flavorList, i);
         if (currentFlavor) {
             // find our gtk flavor
-            nsCString flavorStr;
+            nsXPIDLCString flavorStr;
             currentFlavor->ToString(getter_Copies(flavorStr));
-            GdkAtom gdkFlavor = gdk_atom_intern(flavorStr.get(), FALSE);
+            GdkAtom gdkFlavor = gdk_atom_intern(flavorStr, FALSE);
             MOZ_LOG(sDragLm, LogLevel::Debug,
                    ("looking for data in type %s, gdk flavor %p\n",
-                   flavorStr.get(), gdkFlavor));
+                   static_cast<const char*>(flavorStr), gdkFlavor));
             bool dataFound = false;
             if (gdkFlavor) {
                 GetTargetDragData(gdkFlavor);
             }
             if (mTargetDragData) {
                 MOZ_LOG(sDragLm, LogLevel::Debug, ("dataFound = true\n"));
                 dataFound = true;
             }
             else {
                 MOZ_LOG(sDragLm, LogLevel::Debug, ("dataFound = false\n"));
 
                 // Dragging and dropping from the file manager would cause us 
                 // to parse the source text as a nsIFile URL.
-                if (flavorStr.EqualsLiteral(kFileMime)) {
+                if ( strcmp(flavorStr, kFileMime) == 0 ) {
                     gdkFlavor = gdk_atom_intern(kTextMime, FALSE);
                     GetTargetDragData(gdkFlavor);
                     if (!mTargetDragData) {
                         gdkFlavor = gdk_atom_intern(gTextUriListType, FALSE);
                         GetTargetDragData(gdkFlavor);
                     }
                     if (mTargetDragData) {
                         const char* text = static_cast<char*>(mTargetDragData);
@@ -827,33 +826,33 @@ nsDragService::GetData(nsITransferable *
                                     nsCOMPtr<nsIFile> file;
                                     rv = fileURL->GetFile(getter_AddRefs(file));
                                     if (NS_SUCCEEDED(rv)) {
                                         // The common wrapping code at the end of 
                                         // this function assumes the data is text
                                         // and calls text-specific operations.
                                         // Make a secret hideout here for nsIFile
                                         // objects and return early.
-                                        aTransferable->SetTransferData(flavorStr.get(), file,
+                                        aTransferable->SetTransferData(flavorStr, file,
                                                                        convertedTextLen);
                                         g_free(convertedText);
                                         return NS_OK;
                                     }
                                 }
                             }
                             g_free(convertedText);
                         }
                         continue;
                     }
                 }
 
                 // if we are looking for text/unicode and we fail to find it
                 // on the clipboard first, try again with text/plain. If that
                 // is present, convert it to unicode.
-                if (flavorStr.EqualsLiteral(kUnicodeMime)) {
+                if ( strcmp(flavorStr, kUnicodeMime) == 0 ) {
                     MOZ_LOG(sDragLm, LogLevel::Debug,
                            ("we were looking for text/unicode... \
                            trying with text/plain;charset=utf-8\n"));
                     gdkFlavor = gdk_atom_intern(gTextPlainUTF8Type, FALSE);
                     GetTargetDragData(gdkFlavor);
                     if (mTargetDragData) {
                         MOZ_LOG(sDragLm, LogLevel::Debug, ("Got textplain data\n"));
                         const char* castedText =
@@ -898,17 +897,17 @@ nsDragService::GetData(nsITransferable *
                             } // if plain text data on clipboard
                         } // if plain text flavor present
                     } // if plain text charset=utf-8 flavor present
                 } // if looking for text/unicode
 
                 // if we are looking for text/x-moz-url and we failed to find
                 // it on the clipboard, try again with text/uri-list, and then
                 // _NETSCAPE_URL
-                if (flavorStr.EqualsLiteral(kURLMime)) {
+                if (strcmp(flavorStr, kURLMime) == 0) {
                     MOZ_LOG(sDragLm, LogLevel::Debug,
                            ("we were looking for text/x-moz-url...\
                            trying again with text/uri-list\n"));
                     gdkFlavor = gdk_atom_intern(gTextUriListType, FALSE);
                     GetTargetDragData(gdkFlavor);
                     if (mTargetDragData) {
                         MOZ_LOG(sDragLm, LogLevel::Debug,
                                ("Got text/uri-list data\n"));
@@ -966,31 +965,31 @@ nsDragService::GetData(nsITransferable *
                                    ("failed to get _NETSCAPE_URL data\n"));
                         }
                     }
                 }
 
             } // else we try one last ditch effort to find our data
 
             if (dataFound) {
-                if (!flavorStr.EqualsLiteral(kCustomTypesMime)) {
+                if (strcmp(flavorStr, kCustomTypesMime) != 0) {
                   // the DOM only wants LF, so convert from MacOS line endings
                   // to DOM line endings.
                   nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks(
-                               flavorStr.get(),
+                               flavorStr,
                                &mTargetDragData,
                                reinterpret_cast<int*>(&mTargetDragDataLen));
                 }
         
                 // put it into the transferable.
                 nsCOMPtr<nsISupports> genericDataWrapper;
-                nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(),
+                nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr,
                                     mTargetDragData, mTargetDragDataLen,
                                     getter_AddRefs(genericDataWrapper));
-                aTransferable->SetTransferData(flavorStr.get(),
+                aTransferable->SetTransferData(flavorStr,
                                                genericDataWrapper,
                                                mTargetDragDataLen);
                 // we found one, get out of this loop!
                 MOZ_LOG(sDragLm, LogLevel::Debug, ("dataFound and converted!\n"));
                 break;
             }
         } // if (currentFlavor)
     } // foreach flavor
@@ -1042,22 +1041,22 @@ nsDragService::IsDataFlavorSupported(con
                     uint32_t numFlavors;
                     flavorList->GetLength( &numFlavors );
                     for ( uint32_t flavorIndex = 0;
                           flavorIndex < numFlavors ;
                           ++flavorIndex ) {
                         nsCOMPtr<nsISupportsCString> currentFlavor;
                         currentFlavor = do_QueryElementAt(flavorList, flavorIndex);
                         if (currentFlavor) {
-                            nsCString flavorStr;
+                            nsXPIDLCString flavorStr;
                             currentFlavor->ToString(getter_Copies(flavorStr));
                             MOZ_LOG(sDragLm, LogLevel::Debug,
                                    ("checking %s against %s\n",
-                                   flavorStr.get(), aDataFlavor));
-                            if (flavorStr.Equals(aDataFlavor)) {
+                                   (const char *)flavorStr, aDataFlavor));
+                            if (strcmp(flavorStr, aDataFlavor) == 0) {
                                 MOZ_LOG(sDragLm, LogLevel::Debug,
                                        ("boioioioiooioioioing!\n"));
                                 *_retval = true;
                             }
                         }
                     }
                 }
             }
@@ -1278,23 +1277,23 @@ nsDragService::GetSourceList(void)
                 uint32_t numFlavors;
                 flavorList->GetLength( &numFlavors );
                 for (uint32_t flavorIndex = 0;
                      flavorIndex < numFlavors ;
                      ++flavorIndex ) {
                     nsCOMPtr<nsISupportsCString> currentFlavor;
                     currentFlavor = do_QueryElementAt(flavorList, flavorIndex);
                     if (currentFlavor) {
-                        nsCString flavorStr;
+                        nsXPIDLCString flavorStr;
                         currentFlavor->ToString(getter_Copies(flavorStr));
 
                         // check if text/x-moz-url is supported.
                         // If so, advertise
                         // text/uri-list.
-                        if (flavorStr.EqualsLiteral(kURLMime)) {
+                        if (strcmp(flavorStr, kURLMime) == 0) {
                             listTarget =
                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
                             listTarget->target = g_strdup(gTextUriListType);
                             listTarget->flags = 0;
                             MOZ_LOG(sDragLm, LogLevel::Debug,
                                    ("automatically adding target %s\n",
                                     listTarget->target));
                             targetArray.AppendElement(listTarget);
@@ -1313,42 +1312,42 @@ nsDragService::GetSourceList(void)
                 uint32_t numFlavors;
                 flavorList->GetLength( &numFlavors );
                 for (uint32_t flavorIndex = 0;
                      flavorIndex < numFlavors ;
                      ++flavorIndex ) {
                     nsCOMPtr<nsISupportsCString> currentFlavor;
                     currentFlavor = do_QueryElementAt(flavorList, flavorIndex);
                     if (currentFlavor) {
-                        nsCString flavorStr;
+                        nsXPIDLCString flavorStr;
                         currentFlavor->ToString(getter_Copies(flavorStr));
                         GtkTargetEntry *target =
                           (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
-                        target->target = g_strdup(flavorStr.get());
+                        target->target = g_strdup(flavorStr);
                         target->flags = 0;
                         MOZ_LOG(sDragLm, LogLevel::Debug,
                                ("adding target %s\n", target->target));
                         targetArray.AppendElement(target);
 
                         // If there is a file, add the text/uri-list type.
-                        if (flavorStr.EqualsLiteral(kFileMime)) {
+                        if (strcmp(flavorStr, kFileMime) == 0) {
                             GtkTargetEntry *urilistTarget =
                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
                             urilistTarget->target = g_strdup(gTextUriListType);
                             urilistTarget->flags = 0;
                             MOZ_LOG(sDragLm, LogLevel::Debug,
                                    ("automatically adding target %s\n",
                                     urilistTarget->target));
                             targetArray.AppendElement(urilistTarget);
                         }
                         // Check to see if this is text/unicode.
                         // If it is, add text/plain
                         // since we automatically support text/plain
                         // if we support text/unicode.
-                        else if (flavorStr.EqualsLiteral(kUnicodeMime)) {
+                        else if (strcmp(flavorStr, kUnicodeMime) == 0) {
                             GtkTargetEntry *plainUTF8Target =
                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
                             plainUTF8Target->target = g_strdup(gTextPlainUTF8Type);
                             plainUTF8Target->flags = 0;
                             MOZ_LOG(sDragLm, LogLevel::Debug,
                                    ("automatically adding target %s\n",
                                     plainUTF8Target->target));
                             targetArray.AppendElement(plainUTF8Target);
@@ -1360,17 +1359,17 @@ nsDragService::GetSourceList(void)
                             MOZ_LOG(sDragLm, LogLevel::Debug,
                                    ("automatically adding target %s\n",
                                     plainTarget->target));
                             targetArray.AppendElement(plainTarget);
                         }
                         // Check to see if this is the x-moz-url type.
                         // If it is, add _NETSCAPE_URL
                         // this is a type used by everybody.
-                        else if (flavorStr.EqualsLiteral(kURLMime)) {
+                        else if (strcmp(flavorStr, kURLMime) == 0) {
                             GtkTargetEntry *urlTarget =
                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
                             urlTarget->target = g_strdup(gMozUrlType);
                             urlTarget->flags = 0;
                             MOZ_LOG(sDragLm, LogLevel::Debug,
                                    ("automatically adding target %s\n",
                                     urlTarget->target));
                             targetArray.AppendElement(urlTarget);
@@ -1574,60 +1573,60 @@ CreateUriList(nsIArray *items, gchar **t
 void
 nsDragService::SourceDataGet(GtkWidget        *aWidget,
                              GdkDragContext   *aContext,
                              GtkSelectionData *aSelectionData,
                              guint32           aTime)
 {
     MOZ_LOG(sDragLm, LogLevel::Debug, ("nsDragService::SourceDataGet"));
     GdkAtom target = gtk_selection_data_get_target(aSelectionData);
-    nsCString mimeFlavor;
+    nsXPIDLCString mimeFlavor;
     gchar *typeName = 0;
     typeName = gdk_atom_name(target);
     if (!typeName) {
         MOZ_LOG(sDragLm, LogLevel::Debug, ("failed to get atom name.\n"));
         return;
     }
 
     MOZ_LOG(sDragLm, LogLevel::Debug, ("Type is %s\n", typeName));
-    // make a copy since |nsCString| won't use |g_free|...
+    // make a copy since |nsXPIDLCString| won't use |g_free|...
     mimeFlavor.Adopt(strdup(typeName));
     g_free(typeName);
     // check to make sure that we have data items to return.
     if (!mSourceDataItems) {
         MOZ_LOG(sDragLm, LogLevel::Debug, ("Failed to get our data items\n"));
         return;
     }
 
     nsCOMPtr<nsITransferable> item;
     item = do_QueryElementAt(mSourceDataItems, 0);
     if (item) {
         // if someone was asking for text/plain, lookup unicode instead so
         // we can convert it.
         bool needToDoConversionToPlainText = false;
-        const char* actualFlavor;
-        if (mimeFlavor.EqualsLiteral(kTextMime) ||
-            mimeFlavor.EqualsLiteral(gTextPlainUTF8Type)) {
+        const char* actualFlavor = mimeFlavor;
+        if (strcmp(mimeFlavor, kTextMime) == 0 ||
+            strcmp(mimeFlavor, gTextPlainUTF8Type) == 0) {
             actualFlavor = kUnicodeMime;
             needToDoConversionToPlainText = true;
         }
         // if someone was asking for _NETSCAPE_URL we need to convert to
         // plain text but we also need to look for x-moz-url
-        else if (mimeFlavor.EqualsLiteral(gMozUrlType)) {
+        else if (strcmp(mimeFlavor, gMozUrlType) == 0) {
             actualFlavor = kURLMime;
             needToDoConversionToPlainText = true;
         }
         // if someone was asking for text/uri-list we need to convert to
         // plain text.
-        else if (mimeFlavor.EqualsLiteral(gTextUriListType)) {
+        else if (strcmp(mimeFlavor, gTextUriListType) == 0) {
             actualFlavor = gTextUriListType;
             needToDoConversionToPlainText = true;
         }
         else
-            actualFlavor = mimeFlavor.get();
+            actualFlavor = mimeFlavor;
 
         uint32_t tmpDataLen = 0;
         void    *tmpData = nullptr;
         nsresult rv;
         nsCOMPtr<nsISupports> data;
         rv = item->GetTransferData(actualFlavor,
                                    getter_AddRefs(data),
                                    &tmpDataLen);
@@ -1656,17 +1655,17 @@ nsDragService::SourceDataGet(GtkWidget  
                 // this copies the data
                 gtk_selection_data_set(aSelectionData, target,
                                        8,
                                        (guchar *)tmpData, tmpDataLen);
                 // this wasn't allocated with glib
                 free(tmpData);
             }
         } else {
-            if (mimeFlavor.EqualsLiteral(gTextUriListType)) {
+            if (strcmp(mimeFlavor, gTextUriListType) == 0) {
                 // fall back for text/uri-list
                 gchar *uriList;
                 gint length;
                 CreateUriList(mSourceDataItems, &uriList, &length);
                 gtk_selection_data_set(aSelectionData, target,
                                        8, (guchar *)uriList, length);
                 g_free(uriList);
                 return;
--- a/widget/gtk/nsFilePicker.cpp
+++ b/widget/gtk/nsFilePicker.cpp
@@ -371,17 +371,17 @@ nsFilePicker::Show(int16_t *aReturn)
 
 NS_IMETHODIMP
 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
 {
   // Can't show two dialogs concurrently with the same filepicker
   if (mRunning)
     return NS_ERROR_NOT_AVAILABLE;
 
-  nsCString title;
+  nsXPIDLCString title;
   title.Adopt(ToNewUTF8String(mTitle));
 
   GtkWindow *parent_widget =
     GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
 
   GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
 
   const gchar* accept_button;
@@ -389,17 +389,17 @@ nsFilePicker::Open(nsIFilePickerShownCal
   if (!mOkButtonLabel.IsEmpty()) {
     accept_button = buttonLabel.get();
   } else {
     accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) ?
                     GTK_STOCK_SAVE : GTK_STOCK_OPEN;
   }
 
   GtkWidget *file_chooser =
-      gtk_file_chooser_dialog_new(title.get(), parent_widget, action,
+      gtk_file_chooser_dialog_new(title, parent_widget, action,
                                   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                   accept_button, GTK_RESPONSE_ACCEPT,
                                   nullptr);
   gtk_dialog_set_alternative_button_order(GTK_DIALOG(file_chooser),
                                           GTK_RESPONSE_ACCEPT,
                                           GTK_RESPONSE_CANCEL,
                                           -1);
   if (mAllowURLs) {
--- a/widget/nsTransferable.cpp
+++ b/widget/nsTransferable.cpp
@@ -134,19 +134,19 @@ DataStruct::GetFileSpec(const char* aFil
 nsresult
 DataStruct::WriteCache(nsISupports* aData, uint32_t aDataLen)
 {
   // Get a new path and file to the temp directory
   nsCOMPtr<nsIFile> cacheFile = GetFileSpec(mCacheFileName);
   if (cacheFile) {
     // remember the file name
     if (!mCacheFileName) {
-      nsCString fName;
+      nsXPIDLCString fName;
       cacheFile->GetNativeLeafName(fName);
-      mCacheFileName = strdup(fName.get());
+      mCacheFileName = strdup(fName);
     }
 
     // write out the contents of the clipboard
     // to the file
     //uint32_t bytes;
     nsCOMPtr<nsIOutputStream> outStr;
 
     NS_NewLocalFileOutputStream(getter_AddRefs(outStr),
--- a/widget/windows/nsClipboard.cpp
+++ b/widget/windows/nsClipboard.cpp
@@ -170,76 +170,74 @@ nsresult nsClipboard::SetupNativeDataObj
   // Walk through flavors that contain data and register them
   // into the DataObj as supported flavors
   uint32_t i;
   uint32_t cnt;
   dfList->GetLength(&cnt);
   for (i=0;i<cnt;i++) {
     nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(dfList, i);
     if ( currentFlavor ) {
-      nsCString flavorStr;
+      nsXPIDLCString flavorStr;
       currentFlavor->ToString(getter_Copies(flavorStr));
       // When putting data onto the clipboard, we want to maintain kHTMLMime
       // ("text/html") and not map it to CF_HTML here since this will be done below.
-      UINT format = GetFormat(flavorStr.get(), false);
+      UINT format = GetFormat(flavorStr, false);
 
       // Now tell the native IDataObject about both our mime type and 
       // the native data format
       FORMATETC fe;
       SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL);
-      dObj->AddDataFlavor(flavorStr.get(), &fe);
+      dObj->AddDataFlavor(flavorStr, &fe);
       
       // Do various things internal to the implementation, like map one
       // flavor to another or add additional flavors based on what's required
       // for the win32 impl.
-      if (flavorStr.EqualsLiteral(kUnicodeMime)) {
+      if ( strcmp(flavorStr, kUnicodeMime) == 0 ) {
         // if we find text/unicode, also advertise text/plain (which we will convert
         // on our own in nsDataObj::GetText().
         FORMATETC textFE;
         SET_FORMATETC(textFE, CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL);
         dObj->AddDataFlavor(kTextMime, &textFE);
       }
-      else if (flavorStr.EqualsLiteral(kHTMLMime)) {
+      else if ( strcmp(flavorStr, kHTMLMime) == 0 ) {      
         // if we find text/html, also advertise win32's html flavor (which we will convert
         // on our own in nsDataObj::GetText().
         FORMATETC htmlFE;
         SET_FORMATETC(htmlFE, CF_HTML, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL);
         dObj->AddDataFlavor(kHTMLMime, &htmlFE);     
       }
-      else if (flavorStr.EqualsLiteral(kURLMime)) {
+      else if ( strcmp(flavorStr, kURLMime) == 0 ) {
         // if we're a url, in addition to also being text, we need to register
         // the "file" flavors so that the win32 shell knows to create an internet
         // shortcut when it sees one of these beasts.
         FORMATETC shortcutFE;
         SET_FORMATETC(shortcutFE, ::RegisterClipboardFormat(CFSTR_FILEDESCRIPTORA), 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
         dObj->AddDataFlavor(kURLMime, &shortcutFE);      
         SET_FORMATETC(shortcutFE, ::RegisterClipboardFormat(CFSTR_FILEDESCRIPTORW), 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
         dObj->AddDataFlavor(kURLMime, &shortcutFE);      
         SET_FORMATETC(shortcutFE, ::RegisterClipboardFormat(CFSTR_FILECONTENTS), 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
         dObj->AddDataFlavor(kURLMime, &shortcutFE);  
         SET_FORMATETC(shortcutFE, ::RegisterClipboardFormat(CFSTR_INETURLA), 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
         dObj->AddDataFlavor(kURLMime, &shortcutFE);      
         SET_FORMATETC(shortcutFE, ::RegisterClipboardFormat(CFSTR_INETURLW), 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
         dObj->AddDataFlavor(kURLMime, &shortcutFE);      
       }
-      else if (flavorStr.EqualsLiteral(kPNGImageMime) ||
-               flavorStr.EqualsLiteral(kJPEGImageMime) ||
-               flavorStr.EqualsLiteral(kJPGImageMime) ||
-               flavorStr.EqualsLiteral(kGIFImageMime) ||
-               flavorStr.EqualsLiteral(kNativeImageMime)) {
+      else if ( strcmp(flavorStr, kPNGImageMime) == 0 || strcmp(flavorStr, kJPEGImageMime) == 0 ||
+                strcmp(flavorStr, kJPGImageMime) == 0 || strcmp(flavorStr, kGIFImageMime) == 0 ||
+                strcmp(flavorStr, kNativeImageMime) == 0  ) {
         // if we're an image, register the native bitmap flavor
         FORMATETC imageFE;
         // Add DIBv5
         SET_FORMATETC(imageFE, CF_DIBV5, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
-        dObj->AddDataFlavor(flavorStr.get(), &imageFE);
+        dObj->AddDataFlavor(flavorStr, &imageFE);
         // Add DIBv3 
         SET_FORMATETC(imageFE, CF_DIB, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL)
-        dObj->AddDataFlavor(flavorStr.get(), &imageFE);
+        dObj->AddDataFlavor(flavorStr, &imageFE);
       }
-      else if (flavorStr.EqualsLiteral(kFilePromiseMime)) {
+      else if ( strcmp(flavorStr, kFilePromiseMime) == 0 ) {
          // if we're a file promise flavor, also register the 
          // CFSTR_PREFERREDDROPEFFECT format.  The data object
          // returns a value of DROPEFFECTS_MOVE to the drop target
          // when it asks for the value of this format.  This causes
          // the file to be moved from the temporary location instead
          // of being copied.  The right thing to do here is to call
          // SetData() on the data object and set the value of this format
          // to DROPEFFECTS_MOVE on this particular data object.  But,
@@ -610,127 +608,127 @@ nsresult nsClipboard::GetDataFromDataObj
 
   // Walk through flavors and see which flavor is on the clipboard them on the native clipboard,
   uint32_t i;
   uint32_t cnt;
   flavorList->GetLength(&cnt);
   for (i=0;i<cnt;i++) {
     nsCOMPtr<nsISupportsCString> currentFlavor = do_QueryElementAt(flavorList, i);
     if ( currentFlavor ) {
-      nsCString flavorStr;
+      nsXPIDLCString flavorStr;
       currentFlavor->ToString(getter_Copies(flavorStr));
-      UINT format = GetFormat(flavorStr.get());
+      UINT format = GetFormat(flavorStr);
 
       // Try to get the data using the desired flavor. This might fail, but all is
       // not lost.
       void* data = nullptr;
       uint32_t dataLen = 0;
       bool dataFound = false;
       if (nullptr != aDataObject) {
-        if (NS_SUCCEEDED(GetNativeDataOffClipboard(aDataObject, anIndex, format, flavorStr.get(), &data, &dataLen))) {
+        if (NS_SUCCEEDED(GetNativeDataOffClipboard(aDataObject, anIndex, format, flavorStr, &data, &dataLen))) {
           dataFound = true;
         }
       } 
       else if (nullptr != aWindow) {
         if (NS_SUCCEEDED(GetNativeDataOffClipboard(aWindow, anIndex, format, &data, &dataLen))) {
           dataFound = true;
         }
       }
 
       // This is our second chance to try to find some data, having not found it
       // when directly asking for the flavor. Let's try digging around in other
       // flavors to help satisfy our craving for data.
       if ( !dataFound ) {
-        if (flavorStr.EqualsLiteral(kUnicodeMime)) {
+        if (strcmp(flavorStr, kUnicodeMime) == 0) {
           dataFound = FindUnicodeFromPlainText(aDataObject, anIndex, &data, &dataLen);
         }
-        else if (flavorStr.EqualsLiteral(kURLMime)) {
+        else if ( strcmp(flavorStr, kURLMime) == 0 ) {
           // drags from other windows apps expose the native
           // CFSTR_INETURL{A,W} flavor
           dataFound = FindURLFromNativeURL ( aDataObject, anIndex, &data, &dataLen );
           if (!dataFound) {
             dataFound = FindURLFromLocalFile(aDataObject, anIndex, &data, &dataLen);
           }
         }
       } // if we try one last ditch effort to find our data
 
       // Hopefully by this point we've found it and can go about our business
       if ( dataFound ) {
         nsCOMPtr<nsISupports> genericDataWrapper;
-          if (flavorStr.EqualsLiteral(kFileMime)) {
+          if ( strcmp(flavorStr, kFileMime) == 0 ) {
             // we have a file path in |data|. Create an nsLocalFile object.
             nsDependentString filepath(reinterpret_cast<char16_t*>(data));
             nsCOMPtr<nsIFile> file;
             if (NS_SUCCEEDED(NS_NewLocalFile(filepath, false, getter_AddRefs(file)))) {
               genericDataWrapper = do_QueryInterface(file);
             }
             free(data);
           }
-        else if (flavorStr.EqualsLiteral(kNativeHTMLMime)) {
+        else if ( strcmp(flavorStr, kNativeHTMLMime) == 0 ) {
           uint32_t dummy;
           // the editor folks want CF_HTML exactly as it's on the clipboard, no conversions,
           // no fancy stuff. Pull it off the clipboard, stuff it into a wrapper and hand
           // it back to them.
           if (FindPlatformHTML(aDataObject, anIndex, &data, &dummy, &dataLen)) {
-            nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(), data, dataLen, getter_AddRefs(genericDataWrapper));
+            nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr, data, dataLen, getter_AddRefs(genericDataWrapper));
           }
           else
           {
             free(data);
             continue;     // something wrong with this flavor, keep looking for other data
           }
           free(data);
         }
-        else if (flavorStr.EqualsLiteral(kHTMLMime)) {
+        else if ( strcmp(flavorStr, kHTMLMime) == 0 ) {
           uint32_t startOfData = 0;
           // The JS folks want CF_HTML exactly as it is on the clipboard, but
           // minus the CF_HTML header index information.
           // It also needs to be converted to UTF16 and have linebreaks changed.
           if ( FindPlatformHTML(aDataObject, anIndex, &data, &startOfData, &dataLen) ) {
             dataLen -= startOfData;
             nsPrimitiveHelpers::CreatePrimitiveForCFHTML ( static_cast<char*>(data) + startOfData,
                                                            &dataLen, getter_AddRefs(genericDataWrapper) );
           }
           else
           {
             free(data);
             continue;     // something wrong with this flavor, keep looking for other data
           }
           free(data);
         }
-        else if (flavorStr.EqualsLiteral(kJPEGImageMime) ||
-                 flavorStr.EqualsLiteral(kJPGImageMime) ||
-                 flavorStr.EqualsLiteral(kPNGImageMime)) {
+        else if ( strcmp(flavorStr, kJPEGImageMime) == 0 ||
+                  strcmp(flavorStr, kJPGImageMime) == 0 ||
+                  strcmp(flavorStr, kPNGImageMime) == 0) {
           nsIInputStream * imageStream = reinterpret_cast<nsIInputStream*>(data);
           genericDataWrapper = do_QueryInterface(imageStream);
           NS_IF_RELEASE(imageStream);
         }
         else {
           // Treat custom types as a string of bytes.
-          if (flavorStr.EqualsLiteral(kCustomTypesMime)) {
+          if (strcmp(flavorStr, kCustomTypesMime) != 0) {
             // we probably have some form of text. The DOM only wants LF, so convert from Win32 line 
             // endings to DOM line endings.
             int32_t signedLen = static_cast<int32_t>(dataLen);
-            nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks(flavorStr.get(), &data, &signedLen);
+            nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks ( flavorStr, &data, &signedLen );
             dataLen = signedLen;
 
-            if (flavorStr.EqualsLiteral(kRTFMime)) {
+            if (strcmp(flavorStr, kRTFMime) == 0) {
               // RTF on Windows is known to sometimes deliver an extra null byte.
               if (dataLen > 0 && static_cast<char*>(data)[dataLen - 1] == '\0') {
                 dataLen--;
               }
             }
           }
 
-          nsPrimitiveHelpers::CreatePrimitiveForData(flavorStr.get(), data, dataLen, getter_AddRefs(genericDataWrapper));
+          nsPrimitiveHelpers::CreatePrimitiveForData ( flavorStr, data, dataLen, getter_AddRefs(genericDataWrapper) );
           free(data);
         }
         
         NS_ASSERTION ( genericDataWrapper, "About to put null data into the transferable" );
-        aTransferable->SetTransferData(flavorStr.get(), genericDataWrapper, dataLen);
+        aTransferable->SetTransferData(flavorStr, genericDataWrapper, dataLen);
         res = NS_OK;
 
         // we found one, get out of the loop
         break;
       }
 
     }
   } // foreach flavor
--- a/xpcom/components/nsCategoryManager.cpp
+++ b/xpcom/components/nsCategoryManager.cpp
@@ -784,24 +784,24 @@ NS_CreateServicesFromCategory(const char
   bool hasMore;
   while (NS_SUCCEEDED(senumerator->HasMore(&hasMore)) && hasMore) {
     // From here on just skip any error we get.
     nsAutoCString entryString;
     if (NS_FAILED(senumerator->GetNext(entryString))) {
       continue;
     }
 
-    nsCString contractID;
+    nsXPIDLCString contractID;
     rv = categoryManager->GetCategoryEntry(aCategory, entryString.get(),
                                            getter_Copies(contractID));
     if (NS_FAILED(rv)) {
       continue;
     }
 
-    nsCOMPtr<nsISupports> instance = do_GetService(contractID.get());
+    nsCOMPtr<nsISupports> instance = do_GetService(contractID);
     if (!instance) {
       LogMessage("While creating services from category '%s', could not create service for entry '%s', contract ID '%s'",
                  aCategory, entryString.get(), contractID.get());
       continue;
     }
 
     if (aObserverTopic) {
       // try an observer, if it implements it.
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -1277,24 +1277,23 @@ nsDirectoryViewerFactory::CreateInstance
     // This is where we shunt the HTTP/Index stream into our datasource,
     // and open the directory viewer XUL file as the content stream to
     // load in its place.
 
     // Create a dummy loader that will load a stub XUL document.
     nsCOMPtr<nsICategoryManager> catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
     if (NS_FAILED(rv))
       return rv;
-    nsCString contractID;
+    nsXPIDLCString contractID;
     rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", "application/vnd.mozilla.xul+xml",
                                   getter_Copies(contractID));
     if (NS_FAILED(rv))
       return rv;
 
-    nsCOMPtr<nsIDocumentLoaderFactory>
-      factory(do_GetService(contractID.get(), &rv));
+    nsCOMPtr<nsIDocumentLoaderFactory> factory(do_GetService(contractID, &rv));
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsIURI> uri;
     rv = NS_NewURI(getter_AddRefs(uri), "chrome://communicator/content/directory/directory.xul");
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsIChannel> channel;
     rv = NS_NewChannel(getter_AddRefs(channel),
@@ -1338,24 +1337,23 @@ nsDirectoryViewerFactory::CreateInstance
 
   // setup the original channel's content type
   (void)aChannel->SetContentType(NS_LITERAL_CSTRING("text/html"));
 
   // Otherwise, lets use the html listing
   nsCOMPtr<nsICategoryManager> catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
   if (NS_FAILED(rv))
     return rv;
-  nsCString contractID;
+  nsXPIDLCString contractID;
   rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", "text/html",
                                 getter_Copies(contractID));
   if (NS_FAILED(rv))
     return rv;
 
-  nsCOMPtr<nsIDocumentLoaderFactory>
-    factory(do_GetService(contractID.get(), &rv));
+  nsCOMPtr<nsIDocumentLoaderFactory> factory(do_GetService(contractID, &rv));
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsIStreamListener> listener;
 
   if (viewSource) {
     rv = factory->CreateInstance("view-source", aChannel, aLoadGroup,
                                  NS_LITERAL_CSTRING("text/html; x-view-type=view-source"),
                                  aContainer, aExtraInfo, getter_AddRefs(listener),