Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg
authorRandell Jesup <rjesup@jesup.org>
Sat, 01 Sep 2012 22:35:17 -0400
changeset 107702 3d9424eb6eb473cfd14309fd635ff7d6e29322c2
parent 107701 ca1e9bd6285f9e8c38e84d4f450d144ad706a587
child 107703 3e2f50279d901f7fb9dd099300f2e7c1d8e3580c
child 107704 cb033f52d08f71bc3639518bfddbcff6c5820951
push id2248
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 19:23:44 +0000
treeherdermozilla-aurora@118a3b748323 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs773151
milestone18.0a1
Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg
accessible/src/atk/AccessibleWrap.cpp
accessible/src/atk/ApplicationAccessibleWrap.cpp
accessible/src/atk/nsMaiHyperlink.cpp
accessible/src/base/FocusManager.h
accessible/src/base/Logging.cpp
accessible/src/base/nsAccUtils.cpp
accessible/src/base/nsCoreUtils.cpp
accessible/src/generic/ApplicationAccessible.cpp
accessible/src/generic/DocAccessible.cpp
accessible/src/generic/ImageAccessible.cpp
accessible/src/msaa/AccessibleWrap.cpp
accessible/src/msaa/ia2AccessibleHyperlink.cpp
accessible/src/xul/XULTreeAccessible.cpp
accessible/src/xul/XULTreeGridAccessible.cpp
browser/components/about/AboutRedirector.cpp
browser/components/feeds/src/nsFeedSniffer.cpp
browser/components/shell/src/nsGNOMEShellService.cpp
browser/components/shell/src/nsMacShellService.cpp
caps/src/nsNullPrincipal.cpp
caps/src/nsNullPrincipalURI.cpp
caps/src/nsPrincipal.cpp
caps/src/nsScriptSecurityManager.cpp
chrome/src/nsChromeProtocolHandler.cpp
chrome/src/nsChromeRegistry.cpp
chrome/src/nsChromeRegistryChrome.cpp
content/base/src/FragmentOrElement.cpp
content/base/src/Link.cpp
content/base/src/nsCSPService.cpp
content/base/src/nsContentAreaDragDrop.cpp
content/base/src/nsContentPolicy.cpp
content/base/src/nsContentSink.cpp
content/base/src/nsContentUtils.cpp
content/base/src/nsCopySupport.cpp
content/base/src/nsCrossSiteListenerProxy.cpp
content/base/src/nsDOMFile.cpp
content/base/src/nsDOMFileReader.cpp
content/base/src/nsDOMSerializer.cpp
content/base/src/nsDocument.cpp
content/base/src/nsDocumentEncoder.cpp
content/base/src/nsEventSource.cpp
content/base/src/nsFrameMessageManager.cpp
content/base/src/nsHTMLContentSerializer.cpp
content/base/src/nsINode.cpp
content/base/src/nsImageLoadingContent.cpp
content/base/src/nsNoDataProtocolContentPolicy.cpp
content/base/src/nsObjectLoadingContent.cpp
content/base/src/nsReferencedElement.cpp
content/base/src/nsScriptLoader.cpp
content/base/src/nsWebSocket.cpp
content/base/src/nsXMLHttpRequest.cpp
content/base/test/TestGetURL.cpp
content/canvas/src/WebGLContextGL.cpp
content/events/src/nsEventListenerManager.cpp
content/events/src/nsEventStateManager.cpp
content/events/src/nsXMLEventsManager.cpp
content/html/content/src/nsFormSubmission.cpp
content/html/content/src/nsGenericHTMLElement.cpp
content/html/content/src/nsHTMLAudioElement.cpp
content/html/content/src/nsHTMLInputElement.cpp
content/html/content/src/nsHTMLMediaElement.cpp
content/html/content/src/nsHTMLSharedElement.cpp
content/html/content/src/nsHTMLVideoElement.cpp
content/html/content/src/nsMediaFragmentURIParser.cpp
content/html/content/src/nsMediaFragmentURIParser.h
content/html/document/src/ImageDocument.cpp
content/html/document/src/MediaDocument.cpp
content/html/document/src/PluginDocument.cpp
content/html/document/src/nsHTMLContentSink.cpp
content/html/document/src/nsHTMLDocument.cpp
content/media/MediaResource.cpp
content/svg/content/src/SVGLengthList.cpp
content/svg/content/src/SVGNumberList.cpp
content/svg/content/src/SVGPointList.cpp
content/svg/document/src/nsSVGDocument.cpp
content/xbl/src/nsBindingManager.cpp
content/xbl/src/nsXBLBinding.cpp
content/xbl/src/nsXBLDocumentInfo.cpp
content/xbl/src/nsXBLProtoImplField.cpp
content/xbl/src/nsXBLProtoImplMethod.cpp
content/xbl/src/nsXBLProtoImplProperty.cpp
content/xbl/src/nsXBLPrototypeBinding.cpp
content/xbl/src/nsXBLPrototypeHandler.cpp
content/xbl/src/nsXBLService.cpp
content/xbl/src/nsXBLWindowKeyHandler.cpp
content/xml/content/src/nsXMLStylesheetPI.cpp
content/xml/document/src/nsXMLContentSink.cpp
content/xml/document/src/nsXMLDocument.cpp
content/xslt/src/base/txDouble.cpp
content/xslt/src/xpath/txXPCOMExtensionFunction.cpp
content/xslt/src/xslt/txMozillaStylesheetCompiler.cpp
content/xslt/src/xslt/txMozillaTextOutput.cpp
content/xslt/src/xslt/txMozillaXMLOutput.cpp
content/xslt/src/xslt/txMozillaXSLTProcessor.cpp
content/xtf/src/nsXTFService.cpp
content/xul/content/src/nsXULElement.cpp
content/xul/document/src/nsXULCommandDispatcher.cpp
content/xul/document/src/nsXULDocument.cpp
content/xul/document/src/nsXULPrototypeCache.cpp
content/xul/templates/src/nsRDFConInstanceTestNode.cpp
content/xul/templates/src/nsRDFConMemberTestNode.cpp
content/xul/templates/src/nsXULContentUtils.cpp
content/xul/templates/src/nsXULTemplateBuilder.cpp
content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp
content/xul/templates/src/nsXULTemplateQueryProcessorStorage.cpp
content/xul/templates/src/nsXULTemplateQueryProcessorXML.cpp
content/xul/templates/src/nsXULTemplateResultXML.cpp
docshell/base/nsAboutRedirector.cpp
docshell/base/nsDSURIContentListener.cpp
docshell/base/nsDefaultURIFixup.cpp
docshell/base/nsDocShell.cpp
docshell/shistory/src/nsSHEntry.cpp
docshell/shistory/src/nsSHistory.cpp
dom/base/Navigator.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMException.cpp
dom/base/nsDOMWindowUtils.cpp
dom/base/nsFocusManager.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsGlobalWindowCommands.cpp
dom/base/nsHistory.cpp
dom/base/nsJSEnvironment.cpp
dom/base/nsJSTimeoutHandler.cpp
dom/base/nsLocation.cpp
dom/base/nsScriptNameSpaceManager.cpp
dom/base/nsStructuredCloneContainer.cpp
dom/base/nsWindowMemoryReporter.cpp
dom/bluetooth/linux/BluetoothDBusService.cpp
dom/browser-element/BrowserElementParent.cpp
dom/devicestorage/nsDeviceStorage.cpp
dom/indexedDB/IDBCursor.cpp
dom/indexedDB/IDBIndex.cpp
dom/indexedDB/IDBKeyRange.h
dom/indexedDB/IDBObjectStore.cpp
dom/ipc/CrashReporterParent.cpp
dom/ipc/TabChild.cpp
dom/ipc/TabParent.cpp
dom/plugins/base/nsNPAPIPlugin.cpp
dom/plugins/base/nsNPAPIPluginStreamListener.cpp
dom/plugins/base/nsPluginHost.cpp
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/plugins/base/nsPluginStreamListenerPeer.cpp
dom/plugins/base/nsPluginTags.cpp
dom/plugins/base/nsPluginsDirDarwin.cpp
dom/plugins/base/nsPluginsDirOS2.cpp
dom/plugins/base/nsPluginsDirUnix.cpp
dom/plugins/base/nsPluginsDirWin.cpp
dom/plugins/ipc/PluginModuleParent.cpp
dom/src/geolocation/nsGeolocation.cpp
dom/src/json/nsJSON.cpp
dom/src/jsurl/nsJSProtocolHandler.cpp
dom/src/offline/nsDOMOfflineResourceList.cpp
dom/src/storage/nsDOMStorage.cpp
dom/src/storage/nsDOMStorageDBWrapper.cpp
dom/src/storage/nsDOMStorageMemoryDB.cpp
dom/src/storage/nsDOMStoragePersistentDB.cpp
dom/system/OSFileConstants.cpp
dom/system/gonk/Volume.cpp
dom/system/gonk/VolumeCommand.cpp
dom/system/gonk/nsVolumeService.cpp
dom/workers/ChromeWorkerScope.cpp
dom/workers/FileReaderSyncPrivate.cpp
dom/workers/WorkerPrivate.cpp
editor/composer/src/nsComposerCommands.cpp
editor/composer/src/nsEditingSession.cpp
editor/composer/src/nsEditorSpellCheck.cpp
editor/libeditor/base/nsEditor.cpp
editor/libeditor/html/nsHTMLDataTransfer.cpp
editor/libeditor/html/nsHTMLEditor.cpp
editor/libeditor/text/nsPlaintextEditor.cpp
embedding/components/appstartup/src/nsAppStartupNotifier.cpp
embedding/components/find/src/nsFind.cpp
embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
embedding/components/windowwatcher/public/nsPromptUtils.h
embedding/components/windowwatcher/src/nsWindowWatcher.cpp
extensions/auth/nsAuthGSSAPI.cpp
extensions/auth/nsAuthSASL.cpp
extensions/auth/nsAuthSSPI.cpp
extensions/auth/nsHttpNegotiateAuth.cpp
extensions/cookie/nsCookiePermission.cpp
extensions/cookie/nsPermissionManager.cpp
extensions/cookie/nsPermissionManager.h
extensions/gio/nsGIOProtocolHandler.cpp
extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
extensions/permissions/nsContentBlocker.cpp
extensions/pref/autoconfig/src/nsAutoConfig.cpp
extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp
extensions/pref/autoconfig/src/nsReadConfig.cpp
extensions/spellcheck/hunspell/src/mozHunspell.cpp
extensions/spellcheck/src/mozPersonalDictionary.cpp
extensions/widgetutils/src/nsWidgetUtils.cpp
gfx/gl/GLContext.cpp
gfx/gl/GLContextProviderCGL.mm
gfx/gl/GLLibraryEGL.cpp
gfx/layers/Layers.cpp
gfx/layers/opengl/LayerManagerOGL.cpp
gfx/layers/opengl/LayerManagerOGLProgram.cpp
gfx/src/gfxCrashReporterUtils.cpp
gfx/src/nsColor.cpp
gfx/src/nsThebesFontEnumerator.cpp
gfx/thebes/gfxFT2FontList.cpp
gfx/thebes/gfxFT2Fonts.cpp
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxFont.h
gfx/thebes/gfxFontconfigUtils.cpp
gfx/thebes/gfxGraphiteShaper.cpp
gfx/thebes/gfxOS2Fonts.cpp
gfx/thebes/gfxOS2Platform.cpp
gfx/thebes/gfxPangoFonts.cpp
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPlatformGtk.cpp
gfx/thebes/gfxQtPlatform.cpp
gfx/thebes/gfxUserFontSet.cpp
image/decoders/icon/android/nsIconChannel.cpp
image/decoders/icon/gtk/nsIconChannel.cpp
image/decoders/icon/mac/nsIconChannelCocoa.mm
image/decoders/icon/nsIconURI.cpp
image/decoders/icon/os2/nsIconChannel.cpp
image/decoders/icon/qt/nsIconChannel.cpp
image/decoders/icon/win/nsIconChannel.cpp
image/encoders/png/nsPNGEncoder.cpp
image/public/ImageLogging.h
image/src/imgLoader.cpp
image/src/imgRequest.cpp
image/src/imgRequestProxy.cpp
image/src/imgStatusTracker.cpp
image/src/imgTools.cpp
intl/hyphenation/src/nsHyphenationManager.cpp
intl/locale/src/nsCharsetAlias.cpp
intl/locale/src/nsLanguageAtomService.cpp
intl/locale/src/os2/nsOS2Charset.cpp
intl/locale/src/unix/nsCollationUnix.cpp
intl/locale/src/unix/nsDateTimeFormatUnix.cpp
intl/locale/src/unix/nsUNIXCharset.cpp
intl/locale/src/windows/nsCollationWin.cpp
intl/locale/src/windows/nsWinCharset.cpp
intl/strres/src/nsStringBundle.cpp
intl/strres/src/nsStringBundleTextOverride.cpp
intl/uconv/src/nsCharsetConverterManager.cpp
intl/uconv/src/nsConverterOutputStream.cpp
intl/uconv/src/nsTextToSubURI.cpp
intl/uconv/src/nsUTF8ConverterService.cpp
intl/uconv/tests/TestUConv.cpp
intl/uconv/tests/nsconv.cpp
intl/uconv/tests/plattest.cpp
intl/unicharutil/src/nsEntityConverter.cpp
ipc/glue/GeckoChildProcessHost.cpp
ipc/glue/IPCMessageUtils.h
ipc/glue/WindowsMessageLoop.cpp
js/jsd/jsd_xpc.cpp
js/xpconnect/loader/mozJSComponentLoader.cpp
js/xpconnect/loader/mozJSSubScriptLoader.cpp
js/xpconnect/shell/xpcshell.cpp
js/xpconnect/src/XPCComponents.cpp
js/xpconnect/src/XPCConvert.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/XPCLocale.cpp
js/xpconnect/src/XPCVariant.cpp
js/xpconnect/src/nsScriptError.cpp
js/xpconnect/src/nsXPConnect.cpp
layout/base/nsFrameManager.cpp
layout/base/nsPresContext.cpp
layout/base/nsPresShell.cpp
layout/base/nsStyleSheetService.cpp
layout/build/nsContentDLF.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsImageFrame.cpp
layout/generic/nsSelection.cpp
layout/generic/nsTextFrameThebes.cpp
layout/inspector/src/inCSSValueSearch.cpp
layout/inspector/src/nsFontFace.cpp
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLOperators.cpp
layout/printing/nsPrintEngine.cpp
layout/style/Loader.cpp
layout/style/nsCSSKeywords.cpp
layout/style/nsCSSProps.cpp
layout/style/nsCSSRules.cpp
layout/style/nsCSSStyleSheet.cpp
layout/style/nsCSSValue.cpp
layout/style/nsFontFaceLoader.cpp
layout/style/nsHTMLCSSStyleSheet.cpp
layout/style/nsHTMLStyleSheet.cpp
layout/style/nsROCSSPrimitiveValue.cpp
layout/style/nsStyleAnimation.cpp
layout/style/test/TestCSSPropertyLookup.cpp
layout/xul/base/src/nsXULTooltipListener.cpp
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
modules/libjar/nsJAR.cpp
modules/libjar/nsJARChannel.cpp
modules/libjar/nsJARInputStream.cpp
modules/libjar/nsJARURI.cpp
modules/libpref/src/Preferences.cpp
modules/libpref/src/nsPrefBranch.cpp
modules/libpref/src/prefapi.cpp
netwerk/base/public/nsNetUtil.h
netwerk/base/public/nsURIHashKey.h
netwerk/base/src/nsBaseChannel.cpp
netwerk/base/src/nsDirectoryIndexStream.cpp
netwerk/base/src/nsIOService.cpp
netwerk/base/src/nsIncrementalDownload.cpp
netwerk/base/src/nsLoadGroup.cpp
netwerk/base/src/nsPACMan.cpp
netwerk/base/src/nsProtocolProxyService.cpp
netwerk/base/src/nsSimpleURI.cpp
netwerk/base/src/nsSocketTransport2.cpp
netwerk/base/src/nsStandardURL.cpp
netwerk/base/src/nsURIChecker.cpp
netwerk/base/src/nsURLHelper.cpp
netwerk/base/src/nsURLHelperOS2.cpp
netwerk/base/src/nsURLHelperOSX.cpp
netwerk/base/src/nsURLHelperUnix.cpp
netwerk/base/src/nsURLHelperWin.cpp
netwerk/base/src/nsURLParsers.cpp
netwerk/cache/nsCache.cpp
netwerk/cache/nsCacheEntryDescriptor.cpp
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsDeleteDir.cpp
netwerk/cache/nsDiskCacheDeviceSQL.cpp
netwerk/cookie/CookieServiceChild.cpp
netwerk/cookie/nsCookieService.cpp
netwerk/dns/nsDNSService2.cpp
netwerk/dns/nsEffectiveTLDService.cpp
netwerk/dns/nsIDNService.cpp
netwerk/mime/nsMIMEHeaderParamImpl.cpp
netwerk/protocol/about/nsAboutBloat.cpp
netwerk/protocol/about/nsAboutCache.cpp
netwerk/protocol/about/nsAboutCacheEntry.cpp
netwerk/protocol/about/nsAboutProtocolHandler.cpp
netwerk/protocol/about/nsAboutProtocolUtils.h
netwerk/protocol/data/nsDataChannel.cpp
netwerk/protocol/data/nsDataHandler.cpp
netwerk/protocol/device/nsDeviceChannel.cpp
netwerk/protocol/file/nsFileChannel.cpp
netwerk/protocol/file/nsFileProtocolHandler.cpp
netwerk/protocol/ftp/nsFTPChannel.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/ftp/nsFtpProtocolHandler.cpp
netwerk/protocol/http/ConnectionDiagnostics.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/NullHttpTransaction.cpp
netwerk/protocol/http/PHttpChannelParams.h
netwerk/protocol/http/nsHttpAuthCache.cpp
netwerk/protocol/http/nsHttpBasicAuth.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpChannel.h
netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnectionMgr.cpp
netwerk/protocol/http/nsHttpDigestAuth.cpp
netwerk/protocol/http/nsHttpHandler.cpp
netwerk/protocol/http/nsHttpNTLMAuth.cpp
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/res/nsResProtocolHandler.cpp
netwerk/protocol/viewsource/nsViewSourceChannel.cpp
netwerk/protocol/viewsource/nsViewSourceHandler.cpp
netwerk/protocol/websocket/WebSocketChannel.cpp
netwerk/protocol/websocket/WebSocketChannelParent.cpp
netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
netwerk/protocol/wyciwyg/nsWyciwygProtocolHandler.cpp
netwerk/socket/nsSocketProviderService.cpp
netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
netwerk/streamconv/converters/nsBinHexDecoder.cpp
netwerk/streamconv/converters/nsDirIndexParser.cpp
netwerk/streamconv/converters/nsFTPDirListingConv.cpp
netwerk/streamconv/converters/nsIndexedToHTML.cpp
netwerk/streamconv/converters/nsMultiMixedConv.cpp
netwerk/streamconv/converters/nsUnknownDecoder.cpp
netwerk/streamconv/src/nsStreamConverterService.cpp
netwerk/test/PropertiesTest.cpp
netwerk/test/TestCookie.cpp
netwerk/test/TestDNS.cpp
netwerk/test/TestFileInput2.cpp
netwerk/test/TestIDN.cpp
netwerk/test/TestPerf.cpp
netwerk/test/TestProtocols.cpp
netwerk/test/TestServ.cpp
netwerk/test/TestStandardURL.cpp
netwerk/test/TestStreamTransport.cpp
netwerk/test/urltest.cpp
parser/html/nsHtml5MetaScannerCppSupplement.h
parser/html/nsHtml5Parser.cpp
parser/html/nsHtml5SpeculativeLoad.cpp
parser/html/nsHtml5StreamParser.cpp
parser/html/nsHtml5TreeOpExecutor.cpp
parser/html/nsHtml5TreeOperation.cpp
parser/html/nsParserUtils.cpp
parser/htmlparser/src/nsExpatDriver.cpp
parser/htmlparser/src/nsHTMLEntities.cpp
parser/htmlparser/src/nsParser.cpp
parser/xml/src/nsSAXXMLReader.cpp
profile/dirserviceprovider/src/nsProfileDirServiceProvider.cpp
profile/dirserviceprovider/src/nsProfileLock.cpp
profile/dirserviceprovider/src/nsProfileStringTypes.h
rdf/base/src/nsRDFContainerUtils.cpp
rdf/base/src/nsRDFContentSink.cpp
rdf/base/src/nsRDFService.cpp
rdf/base/src/nsRDFService.h
rdf/base/src/nsRDFXMLDataSource.cpp
rdf/base/src/nsRDFXMLSerializer.cpp
rdf/base/src/rdfTriplesSerializer.cpp
rdf/datasource/src/nsFileSystemDataSource.cpp
rdf/datasource/src/nsLocalStore.cpp
rdf/tests/dsds/nsRDFDataSourceDS.cpp
rdf/util/src/nsRDFResource.cpp
security/manager/boot/src/nsSecureBrowserUIImpl.cpp
security/manager/boot/src/nsSecurityWarningDialogs.cpp
security/manager/boot/src/nsStrictTransportSecurityService.cpp
security/manager/ssl/src/SSLServerCertVerification.cpp
security/manager/ssl/src/TransportSecurityInfo.cpp
security/manager/ssl/src/nsCRLInfo.cpp
security/manager/ssl/src/nsCRLManager.cpp
security/manager/ssl/src/nsCertOverrideService.cpp
security/manager/ssl/src/nsCertTree.cpp
security/manager/ssl/src/nsClientAuthRemember.cpp
security/manager/ssl/src/nsCrypto.cpp
security/manager/ssl/src/nsIdentityChecking.cpp
security/manager/ssl/src/nsNSSCertHelper.cpp
security/manager/ssl/src/nsNSSCertificateDB.cpp
security/manager/ssl/src/nsNSSComponent.cpp
security/manager/ssl/src/nsNSSIOLayer.cpp
security/manager/ssl/src/nsNTLMAuthModule.cpp
security/manager/ssl/src/nsUsageArrayHelper.cpp
startupcache/StartupCacheUtils.cpp
storage/src/VacuumManager.cpp
storage/src/mozStorageBindingParams.cpp
storage/src/mozStorageConnection.cpp
storage/src/mozStoragePrivateHelpers.cpp
storage/src/mozStorageRow.cpp
storage/src/mozStorageStatement.cpp
storage/src/mozStorageStatementParams.cpp
storage/src/variantToSQLiteT_impl.h
storage/test/storage_test_harness.h
storage/test/test_binding_params.cpp
toolkit/components/alerts/mac/mozGrowlDelegate.mm
toolkit/components/alerts/mac/nsAlertsImageLoadListener.mm
toolkit/components/autocomplete/nsAutoCompleteController.cpp
toolkit/components/commandlines/nsCommandLine.cpp
toolkit/components/ctypes/ctypes.cpp
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/downloads/nsDownloadScanner.cpp
toolkit/components/intl/nsCharsetMenu.cpp
toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp
toolkit/components/places/AsyncFaviconHelpers.cpp
toolkit/components/places/Database.cpp
toolkit/components/places/Helpers.cpp
toolkit/components/places/History.cpp
toolkit/components/places/SQLFunctions.cpp
toolkit/components/places/nsAndroidHistory.cpp
toolkit/components/places/nsAnnoProtocolHandler.cpp
toolkit/components/places/nsAnnotationService.cpp
toolkit/components/places/nsFaviconService.cpp
toolkit/components/places/nsNavBookmarks.cpp
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/nsNavHistory.h
toolkit/components/places/nsNavHistoryQuery.cpp
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/components/places/nsNavHistoryResult.h
toolkit/components/places/nsPlacesExportService.cpp
toolkit/components/places/tests/cpp/test_IHistory.cpp
toolkit/components/remote/nsXRemoteService.cpp
toolkit/components/startup/nsAppStartup.cpp
toolkit/components/startup/nsUserInfoMac.mm
toolkit/components/startup/nsUserInfoUnix.cpp
toolkit/components/telemetry/Telemetry.cpp
toolkit/components/url-classifier/Classifier.cpp
toolkit/components/url-classifier/Entries.h
toolkit/components/url-classifier/HashStore.cpp
toolkit/components/url-classifier/HashStore.h
toolkit/components/url-classifier/LookupCache.cpp
toolkit/components/url-classifier/ProtocolParser.cpp
toolkit/components/url-classifier/nsCheckSummedOutputStream.h
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp
toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
toolkit/components/url-classifier/tests/TestUrlClassifierUtils.cpp
toolkit/crashreporter/nsExceptionHandler.cpp
toolkit/profile/nsToolkitProfileService.cpp
toolkit/system/gnome/nsAlertsIconListener.cpp
toolkit/system/gnome/nsGConfService.cpp
toolkit/system/gnome/nsGIOService.cpp
toolkit/system/gnome/nsGnomeVFSService.cpp
toolkit/system/osxproxy/nsOSXSystemProxySettings.mm
toolkit/system/unixproxy/nsLibProxySettings.cpp
toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp
toolkit/xre/ProfileReset.cpp
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsConsoleWriter.cpp
toolkit/xre/nsNativeAppSupportOS2.cpp
toolkit/xre/nsNativeAppSupportQt.cpp
toolkit/xre/nsNativeAppSupportUnix.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
toolkit/xre/nsUpdateDriver.cpp
toolkit/xre/nsUpdateDriver.h
toolkit/xre/nsX11ErrorHandler.cpp
toolkit/xre/nsXREDirProvider.cpp
tools/profiler/TableTicker.cpp
uriloader/base/nsDocLoader.cpp
uriloader/base/nsURILoader.cpp
uriloader/exthandler/android/nsMIMEInfoAndroid.cpp
uriloader/exthandler/mac/nsLocalHandlerAppMac.mm
uriloader/exthandler/mac/nsMIMEInfoMac.mm
uriloader/exthandler/mac/nsOSHelperAppService.mm
uriloader/exthandler/nsContentHandlerApp.cpp
uriloader/exthandler/nsDBusHandlerApp.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
uriloader/exthandler/nsExternalProtocolHandler.cpp
uriloader/exthandler/nsLocalHandlerApp.cpp
uriloader/exthandler/nsMIMEInfoImpl.cpp
uriloader/exthandler/os2/nsMIMEInfoOS2.cpp
uriloader/exthandler/os2/nsOSHelperAppService.cpp
uriloader/exthandler/unix/nsGNOMERegistry.cpp
uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
uriloader/exthandler/unix/nsOSHelperAppService.cpp
uriloader/exthandler/win/nsMIMEInfoWin.cpp
uriloader/exthandler/win/nsOSHelperAppService.cpp
uriloader/prefetch/OfflineCacheUpdateChild.cpp
uriloader/prefetch/OfflineCacheUpdateGlue.cpp
uriloader/prefetch/nsOfflineCacheUpdate.cpp
uriloader/prefetch/nsPrefetchService.cpp
widget/android/GfxInfo.cpp
widget/android/nsDeviceContextAndroid.cpp
widget/cocoa/GfxInfo.mm
widget/cocoa/nsAppShell.mm
widget/cocoa/nsChildView.mm
widget/cocoa/nsClipboard.mm
widget/cocoa/nsMacCursor.mm
widget/cocoa/nsMenuItemX.mm
widget/cocoa/nsPrintSettingsX.mm
widget/gtk2/nsCUPSShim.cpp
widget/gtk2/nsClipboard.cpp
widget/gtk2/nsDeviceContextSpecG.cpp
widget/gtk2/nsFilePicker.cpp
widget/gtk2/nsPSPrinters.cpp
widget/gtk2/nsPrintSettingsGTK.cpp
widget/gtk2/nsSound.cpp
widget/gtk2/nsWindow.cpp
widget/os2/nsDeviceContextSpecOS2.cpp
widget/os2/nsDragService.cpp
widget/os2/nsFilePicker.cpp
widget/os2/nsOS2Uni.cpp
widget/os2/nsPrintOS2.cpp
widget/os2/nsRwsService.cpp
widget/os2/nsSound.cpp
widget/os2/nsWindow.cpp
widget/os2/os2FrameWindow.cpp
widget/qt/nsClipboard.cpp
widget/qt/nsFilePicker.cpp
widget/qt/nsSound.cpp
widget/qt/nsWindow.cpp
widget/tests/TestAppShellSteadyState.cpp
widget/tests/TestWinTSF.cpp
widget/windows/GfxInfo.cpp
widget/windows/JumpListBuilder.cpp
widget/windows/JumpListItem.cpp
widget/windows/WinTaskbar.cpp
widget/windows/WinUtils.cpp
widget/windows/WinUtils.h
widget/windows/nsClipboard.cpp
widget/windows/nsDataObj.cpp
widget/windows/nsDataObjCollection.cpp
widget/windows/nsIMM32Handler.cpp
widget/windows/nsImageClipboard.cpp
widget/windows/nsSound.cpp
widget/windows/nsTextStore.cpp
widget/windows/nsWindow.cpp
widget/windows/nsWindowGfx.cpp
widget/xpwidgets/GfxInfoX11.cpp
widget/xpwidgets/PuppetWidget.cpp
widget/xpwidgets/nsBaseWidget.cpp
widget/xpwidgets/nsBaseWidget.h
widget/xpwidgets/nsHTMLFormatConverter.cpp
widget/xpwidgets/nsPrimitiveHelpers.cpp
widget/xpwidgets/nsPrintOptionsImpl.cpp
widget/xpwidgets/nsTransferable.cpp
xpcom/base/MapsMemoryReporter.cpp
xpcom/base/nsTraceRefcntImpl.cpp
xpcom/build/FileLocation.cpp
xpcom/build/Omnijar.cpp
xpcom/build/mozPoisonWriteMac.cpp
xpcom/components/ManifestParser.cpp
xpcom/components/nsCategoryManager.cpp
xpcom/components/nsComponentManager.cpp
xpcom/components/nsNativeComponentLoader.cpp
xpcom/ds/nsAtomTable.cpp
xpcom/ds/nsHashtable.cpp
xpcom/ds/nsStaticNameTable.cpp
xpcom/ds/nsVariant.cpp
xpcom/glue/BlockingResourceBase.cpp
xpcom/glue/GenericModule.cpp
xpcom/glue/nsCategoryCache.cpp
xpcom/glue/nsINIParser.cpp
xpcom/glue/nsStringAPI.h
xpcom/io/Base64.cpp
xpcom/io/nsDirectoryService.cpp
xpcom/io/nsLocalFileCommon.cpp
xpcom/io/nsLocalFileOS2.cpp
xpcom/io/nsLocalFileUnix.cpp
xpcom/string/public/nsString.h
xpcom/string/public/nsStringFwd.h
xpcom/string/public/nsTString.h
xpcom/string/public/string-template-def-char.h
xpcom/tests/TestFile.cpp
xpcom/tests/TestHashtables.cpp
xpcom/tests/TestStrings.cpp
xpcom/tests/TestTArray.cpp
xpcom/tests/nsIFileEnumerator.cpp
xpcom/threads/nsEnvironment.cpp
xpfe/appshell/src/nsAppShellService.cpp
xpfe/appshell/src/nsContentTreeOwner.cpp
xpfe/appshell/src/nsWebShellWindow.cpp
xpfe/components/directory/nsDirectoryViewer.cpp
xpfe/components/windowds/nsWindowDataSource.cpp
xulrunner/app/nsXULRunnerApp.cpp
--- a/accessible/src/atk/AccessibleWrap.cpp
+++ b/accessible/src/atk/AccessibleWrap.cpp
@@ -719,17 +719,17 @@ ConvertToAtkAttributeSet(nsIPersistentPr
     while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) {
         nsCOMPtr<nsISupports> sup;
         rv = propEnum->GetNext(getter_AddRefs(sup));
         NS_ENSURE_SUCCESS(rv, objAttributeSet);
 
         nsCOMPtr<nsIPropertyElement> propElem(do_QueryInterface(sup));
         NS_ENSURE_TRUE(propElem, objAttributeSet);
 
-        nsCAutoString name;
+        nsAutoCString name;
         rv = propElem->GetKey(name);
         NS_ENSURE_SUCCESS(rv, objAttributeSet);
 
         nsAutoString value;
         rv = propElem->GetValue(value);
         NS_ENSURE_SUCCESS(rv, objAttributeSet);
 
         AtkAttribute *objAttr = (AtkAttribute *)g_malloc(sizeof(AtkAttribute));
--- a/accessible/src/atk/ApplicationAccessibleWrap.cpp
+++ b/accessible/src/atk/ApplicationAccessibleWrap.cpp
@@ -781,34 +781,34 @@ LoadGtkModule(GnomeAccessibilityModule& 
     NS_ENSURE_ARG(aModule.libName);
 
     if (!(aModule.lib = PR_LoadLibrary(aModule.libName))) {
 
         MAI_LOG_DEBUG(("Fail to load lib: %s in default path\n", aModule.libName));
 
         //try to load the module with "gtk-2.0/modules" appended
         char *curLibPath = PR_GetLibraryPath();
-        nsCAutoString libPath(curLibPath);
+        nsAutoCString libPath(curLibPath);
 #if defined(LINUX) && defined(__x86_64__)
         libPath.Append(":/usr/lib64:/usr/lib");
 #else
         libPath.Append(":/usr/lib");
 #endif
         MAI_LOG_DEBUG(("Current Lib path=%s\n", libPath.get()));
         PR_FreeLibraryName(curLibPath);
 
         int16_t loc1 = 0, loc2 = 0;
         int16_t subLen = 0;
         while (loc2 >= 0) {
             loc2 = libPath.FindChar(':', loc1);
             if (loc2 < 0)
                 subLen = libPath.Length() - loc1;
             else
                 subLen = loc2 - loc1;
-            nsCAutoString sub(Substring(libPath, loc1, subLen));
+            nsAutoCString sub(Substring(libPath, loc1, subLen));
             sub.Append("/gtk-2.0/modules/");
             sub.Append(aModule.libName);
             aModule.lib = PR_LoadLibrary(sub.get());
             if (aModule.lib) {
                 MAI_LOG_DEBUG(("Ok, load %s from %s\n", aModule.libName, sub.get()));
                 break;
             }
             loc1 = loc2+1;
--- a/accessible/src/atk/nsMaiHyperlink.cpp
+++ b/accessible/src/atk/nsMaiHyperlink.cpp
@@ -181,17 +181,17 @@ getUriCB(AtkHyperlink *aLink, gint aLink
 {
     Accessible* hyperlink = get_accessible_hyperlink(aLink);
     NS_ENSURE_TRUE(hyperlink, nullptr);
 
     nsCOMPtr<nsIURI> uri = hyperlink->AnchorURIAt(aLinkIndex);
     if (!uri)
         return nullptr;
 
-    nsCAutoString cautoStr;
+    nsAutoCString cautoStr;
     nsresult rv = uri->GetSpec(cautoStr);
     NS_ENSURE_SUCCESS(rv, nullptr);
 
     return g_strdup(cautoStr.get());
 }
 
 AtkObject *
 getObjectCB(AtkHyperlink *aLink, gint aLinkIndex)
--- a/accessible/src/base/FocusManager.h
+++ b/accessible/src/base/FocusManager.h
@@ -151,27 +151,27 @@ private:
     uint32_t msecs = PR_IntervalToMilliseconds(time) % 1000;                   \
     printf("Time: %2d:%2d.%3d\n", mins, secs, msecs);                          \
   }
 
 #define A11YDEBUG_FOCUS_LOG_DOMNODE(aNode)                                     \
   if (aNode) {                                                                 \
     if (aNode->IsElement()) {                                                  \
       dom::Element* targetElm = aNode->AsElement();                            \
-      nsCAutoString tag;                                                       \
+      nsAutoCString tag;                                                       \
       targetElm->Tag()->ToUTF8String(tag);                                     \
-      nsCAutoString id;                                                        \
+      nsAutoCString id;                                                        \
       nsIAtom* atomid = targetElm->GetID();                                    \
       if (atomid)                                                              \
         atomid->ToUTF8String(id);                                              \
       printf("element %s@id='%s': %p", tag.get(), id.get(), (void*)aNode);     \
     } else if (aNode->IsNodeOfType(nsINode::eDOCUMENT)) {                      \
       nsCOMPtr<nsIDocument> document = do_QueryInterface(aNode);               \
       nsIURI* uri = document->GetDocumentURI();                                \
-      nsCAutoString spec;                                                      \
+      nsAutoCString spec;                                                      \
       uri->GetSpec(spec);                                                      \
       printf("document: %p; uri: %s", (void*)aNode, spec.get());               \
     }                                                                          \
   }
 
 #define A11YDEBUG_FOCUS_LOG_ACCESSIBLE(aAccessible)                            \
   printf("accessible: %p; ", (void*)aAccessible);                              \
   if (aAccessible) {                                                           \
--- a/accessible/src/base/Logging.cpp
+++ b/accessible/src/base/Logging.cpp
@@ -75,27 +75,27 @@ EnableLogging(const char* aModulesStr)
       token++; // skip ',' char
   }
 }
 
 static void
 LogDocURI(nsIDocument* aDocumentNode)
 {
   nsIURI* uri = aDocumentNode->GetDocumentURI();
-  nsCAutoString spec;
+  nsAutoCString spec;
   uri->GetSpec(spec);
   printf("uri: %s", spec.get());
 }
 
 static void
 LogDocShellState(nsIDocument* aDocumentNode)
 {
   printf("docshell busy: ");
 
-  nsCAutoString docShellBusy;
+  nsAutoCString docShellBusy;
   nsCOMPtr<nsISupports> container = aDocumentNode->GetContainer();
   if (container) {
     nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(container);
     uint32_t busyFlags = nsIDocShell::BUSY_FLAGS_NONE;
     docShell->GetBusyFlags(&busyFlags);
     if (busyFlags == nsIDocShell::BUSY_FLAGS_NONE)
       printf("'none'");
     if (busyFlags & nsIDocShell::BUSY_FLAGS_BUSY)
@@ -291,17 +291,17 @@ LogShellLoadType(nsIDocShell* aDocShell)
       printf("unknown");
   }
 }
 
 static void
 LogRequest(nsIRequest* aRequest)
 {
   if (aRequest) {
-    nsCAutoString name;
+    nsAutoCString name;
     aRequest->GetName(name);
     printf("    request spec: %s\n", name.get());
     uint32_t loadFlags = 0;
     aRequest->GetLoadFlags(&loadFlags);
     printf("    request load flags: %x; ", loadFlags);
     if (loadFlags & nsIChannel::LOAD_DOCUMENT_URI)
       printf("document uri; ");
     if (loadFlags & nsIChannel::LOAD_RETARGETED_DOCUMENT_URI)
@@ -402,26 +402,26 @@ logging::DocLoad(const char* aMsg, nsIDo
   LogDocInfo(aDocumentNode, document);
 
   MsgEnd();
 }
 
 void
 logging::DocLoadEventFired(AccEvent* aEvent)
 {
-  nsCAutoString strEventType;
+  nsAutoCString strEventType;
   GetDocLoadEventType(aEvent, strEventType);
   if (!strEventType.IsEmpty())
     printf("  fire: %s\n", strEventType.get());
 }
 
 void
 logging::DocLoadEventHandled(AccEvent* aEvent)
 {
-  nsCAutoString strEventType;
+  nsAutoCString strEventType;
   GetDocLoadEventType(aEvent, strEventType);
   if (strEventType.IsEmpty())
     return;
 
   MsgBegin(sDocEventTitle, "handled '%s' event", strEventType.get());
 
   nsINode* node = aEvent->GetNode();
   if (node->IsNodeOfType(nsINode::eDOCUMENT)) {
@@ -569,21 +569,21 @@ logging::Node(const char* aDescr, nsINod
   if (!aNode->IsElement()) {
     printf("%s: %p, not accessible node type, idx in parent: %d\n",
            aDescr, static_cast<void*>(aNode), idxInParent);
     return;
   }
 
   dom::Element* elm = aNode->AsElement();
 
-  nsCAutoString tag;
+  nsAutoCString tag;
   elm->Tag()->ToUTF8String(tag);
 
   nsIAtom* idAtom = elm->GetID();
-  nsCAutoString id;
+  nsAutoCString id;
   if (idAtom)
     idAtom->ToUTF8String(id);
 
   printf("%s: %p, %s@id='%s', idx in parent: %d\n",
          aDescr, static_cast<void*>(elm), tag.get(), id.get(), idxInParent);
 }
 
 void
--- a/accessible/src/base/nsAccUtils.cpp
+++ b/accessible/src/base/nsAccUtils.cpp
@@ -35,17 +35,17 @@ nsAccUtils::GetAccAttr(nsIPersistentProp
   aAttributes->GetStringProperty(nsAtomCString(aAttrName), aAttrValue);
 }
 
 void
 nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes,
                        nsIAtom *aAttrName, const nsAString& aAttrValue)
 {
   nsAutoString oldValue;
-  nsCAutoString attrName;
+  nsAutoCString attrName;
 
   aAttributes->SetStringProperty(nsAtomCString(aAttrName), aAttrValue, oldValue);
 }
 
 void
 nsAccUtils::SetAccGroupAttrs(nsIPersistentProperties *aAttributes,
                              int32_t aLevel, int32_t aSetSize,
                              int32_t aPosInSet)
--- a/accessible/src/base/nsCoreUtils.cpp
+++ b/accessible/src/base/nsCoreUtils.cpp
@@ -470,17 +470,17 @@ bool
 nsCoreUtils::IsErrorPage(nsIDocument *aDocument)
 {
   nsIURI *uri = aDocument->GetDocumentURI();
   bool isAboutScheme = false;
   uri->SchemeIs("about", &isAboutScheme);
   if (!isAboutScheme)
     return false;
 
-  nsCAutoString path;
+  nsAutoCString path;
   uri->GetPath(path);
 
   NS_NAMED_LITERAL_CSTRING(neterror, "neterror");
   NS_NAMED_LITERAL_CSTRING(certerror, "certerror");
 
   return StringBeginsWith(path, neterror) || StringBeginsWith(path, certerror);
 }
 
--- a/accessible/src/generic/ApplicationAccessible.cpp
+++ b/accessible/src/generic/ApplicationAccessible.cpp
@@ -213,33 +213,33 @@ ApplicationAccessible::DoAction(uint8_t 
 NS_IMETHODIMP
 ApplicationAccessible::GetAppName(nsAString& aName)
 {
   aName.Truncate();
 
   if (!mAppInfo)
     return NS_ERROR_FAILURE;
 
-  nsCAutoString cname;
+  nsAutoCString cname;
   nsresult rv = mAppInfo->GetName(cname);
   NS_ENSURE_SUCCESS(rv, rv);
 
   AppendUTF8toUTF16(cname, aName);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 ApplicationAccessible::GetAppVersion(nsAString& aVersion)
 {
   aVersion.Truncate();
 
   if (!mAppInfo)
     return NS_ERROR_FAILURE;
 
-  nsCAutoString cversion;
+  nsAutoCString cversion;
   nsresult rv = mAppInfo->GetVersion(cversion);
   NS_ENSURE_SUCCESS(rv, rv);
 
   AppendUTF8toUTF16(cversion, aVersion);
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -252,17 +252,17 @@ ApplicationAccessible::GetPlatformName(n
 NS_IMETHODIMP
 ApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
 {
   aVersion.Truncate();
 
   if (!mAppInfo)
     return NS_ERROR_FAILURE;
 
-  nsCAutoString cversion;
+  nsAutoCString cversion;
   nsresult rv = mAppInfo->GetPlatformVersion(cversion);
   NS_ENSURE_SUCCESS(rv, rv);
 
   AppendUTF8toUTF16(cversion, aVersion);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/generic/DocAccessible.cpp
+++ b/accessible/src/generic/DocAccessible.cpp
@@ -381,17 +381,17 @@ DocAccessible::TakeFocus()
 NS_IMETHODIMP
 DocAccessible::GetURL(nsAString& aURL)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsISupports> container = mDocument->GetContainer();
   nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(container));
-  nsCAutoString theURL;
+  nsAutoCString theURL;
   if (webNav) {
     nsCOMPtr<nsIURI> pURI;
     webNav->GetCurrentURI(getter_AddRefs(pURI));
     if (pURI)
       pURI->GetSpec(theURL);
   }
   CopyUTF8toUTF16(theURL, aURL);
   return NS_OK;
--- a/accessible/src/generic/ImageAccessible.cpp
+++ b/accessible/src/generic/ImageAccessible.cpp
@@ -131,17 +131,17 @@ ImageAccessible::DoAction(uint8_t aIndex
   // Get the long description uri and open in a new window.
   if (!IsLongDescIndex(aIndex))
     return LinkableAccessible::DoAction(aIndex);
 
   nsCOMPtr<nsIURI> uri = GetLongDescURI();
   if (!uri)
     return NS_ERROR_INVALID_ARG;
 
-  nsCAutoString utf8spec;
+  nsAutoCString utf8spec;
   uri->GetSpec(utf8spec);
   NS_ConvertUTF8toUTF16 spec(utf8spec);
 
   nsIDocument* document = mContent->OwnerDoc();
   nsCOMPtr<nsPIDOMWindow> piWindow = document->GetWindow();
   nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(piWindow);
   NS_ENSURE_STATE(win);
 
--- a/accessible/src/msaa/AccessibleWrap.cpp
+++ b/accessible/src/msaa/AccessibleWrap.cpp
@@ -1563,17 +1563,17 @@ AccessibleWrap::FirePlatformEvent(AccEve
   int32_t childID = GetChildIDFor(accessible); // get the id for the accessible
   if (!childID)
     return NS_OK; // Can't fire an event without a child ID
 
   HWND hWnd = GetHWNDFor(accessible);
   NS_ENSURE_TRUE(hWnd, NS_ERROR_FAILURE);
 
   nsAutoString tag;
-  nsCAutoString id;
+  nsAutoCString id;
   nsIContent* cnt = accessible->GetContent();
   if (cnt) {
     cnt->Tag()->ToString(tag);
     nsIAtom* aid = cnt->GetID();
     if (aid)
       aid->ToUTF8String(id);
   }
 
@@ -1673,17 +1673,17 @@ AccessibleWrap::ConvertToIA2Attributes(n
   while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) {
     nsCOMPtr<nsISupports> propSupports;
     propEnum->GetNext(getter_AddRefs(propSupports));
 
     nsCOMPtr<nsIPropertyElement> propElem(do_QueryInterface(propSupports));
     if (!propElem)
       return E_FAIL;
 
-    nsCAutoString name;
+    nsAutoCString name;
     if (NS_FAILED(propElem->GetKey(name)))
       return E_FAIL;
 
     uint32_t offset = 0;
     while ((offset = name.FindCharInSet(kCharsToEscape, offset)) != kNotFound) {
       name.Insert('\\', offset);
       offset += 2;
     }
--- a/accessible/src/msaa/ia2AccessibleHyperlink.cpp
+++ b/accessible/src/msaa/ia2AccessibleHyperlink.cpp
@@ -83,22 +83,22 @@ ia2AccessibleHyperlink::get_anchorTarget
 
   if (!thisObj->IsLink())
     return S_FALSE;
 
   nsCOMPtr<nsIURI> uri = thisObj->AnchorURIAt(aIndex);
   if (!uri)
     return S_FALSE;
 
-  nsCAutoString prePath;
+  nsAutoCString prePath;
   nsresult rv = uri->GetPrePath(prePath);
   if (NS_FAILED(rv))
     return GetHRESULT(rv);
 
-  nsCAutoString path;
+  nsAutoCString path;
   rv = uri->GetPath(path);
   if (NS_FAILED(rv))
     return GetHRESULT(rv);
 
   nsAutoString stringURI;
   AppendUTF8toUTF16(prePath, stringURI);
   AppendUTF8toUTF16(path, stringURI);
 
--- a/accessible/src/xul/XULTreeAccessible.cpp
+++ b/accessible/src/xul/XULTreeAccessible.cpp
@@ -194,17 +194,17 @@ XULTreeAccessible::ChildAtPoint(int32_t 
 
   nsIntRect rootRect = rootFrame->GetScreenRect();
 
   int32_t clientX = presContext->DevPixelsToIntCSSPixels(aX) - rootRect.x;
   int32_t clientY = presContext->DevPixelsToIntCSSPixels(aY) - rootRect.y;
 
   int32_t row = -1;
   nsCOMPtr<nsITreeColumn> column;
-  nsCAutoString childEltUnused;
+  nsAutoCString childEltUnused;
   mTree->GetCellAt(clientX, clientY, &row, getter_AddRefs(column),
                    childEltUnused);
 
   // If we failed to find tree cell for the given point then it might be
   // tree columns.
   if (row == -1 || !column)
     return AccessibleWrap::ChildAtPoint(aX, aY, aWhichChild);
 
@@ -1023,17 +1023,17 @@ XULTreeItemAccessibleBase::DispatchClick
 
   nsCOMPtr<nsITreeColumns> columns;
   mTree->GetColumns(getter_AddRefs(columns));
   if (!columns)
     return;
 
   // Get column and pseudo element.
   nsCOMPtr<nsITreeColumn> column;
-  nsCAutoString pseudoElm;
+  nsAutoCString pseudoElm;
 
   if (aActionIndex == eAction_Click) {
     // Key column is visible and clickable.
     columns->GetKeyColumn(getter_AddRefs(column));
   } else {
     // Primary column contains a twisty we should click on.
     columns->GetPrimaryColumn(getter_AddRefs(column));
     pseudoElm = NS_LITERAL_CSTRING("twisty");
--- a/accessible/src/xul/XULTreeGridAccessible.cpp
+++ b/accessible/src/xul/XULTreeGridAccessible.cpp
@@ -362,17 +362,17 @@ XULTreeGridRowAccessible::ChildAtPoint(i
 
   nsIntRect rootRect = rootFrame->GetScreenRect();
 
   int32_t clientX = presContext->DevPixelsToIntCSSPixels(aX) - rootRect.x;
   int32_t clientY = presContext->DevPixelsToIntCSSPixels(aY) - rootRect.y;
 
   int32_t row = -1;
   nsCOMPtr<nsITreeColumn> column;
-  nsCAutoString childEltUnused;
+  nsAutoCString childEltUnused;
   mTree->GetCellAt(clientX, clientY, &row, getter_AddRefs(column),
                    childEltUnused);
 
   // Return if we failed to find tree cell in the row for the given point.
   if (row != mRow || !column)
     return nullptr;
 
   return GetCellAccessible(column);
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -75,20 +75,20 @@ static RedirEntry kRedirMap[] = {
     nsIAboutModule::ALLOW_SCRIPT },
   { "permissions", "chrome://browser/content/preferences/aboutPermissions.xul",
     nsIAboutModule::ALLOW_SCRIPT },
   { "preferences", "chrome://browser/content/preferences/in-content/preferences.xul",
     nsIAboutModule::ALLOW_SCRIPT },
 };
 static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
 
-static nsCAutoString
+static nsAutoCString
 GetAboutModuleName(nsIURI *aURI)
 {
-  nsCAutoString path;
+  nsAutoCString path;
   aURI->GetPath(path);
 
   int32_t f = path.FindChar('#');
   if (f >= 0)
     path.SetLength(f);
 
   f = path.FindChar('?');
   if (f >= 0)
@@ -99,17 +99,17 @@ GetAboutModuleName(nsIURI *aURI)
 }
 
 NS_IMETHODIMP
 AboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result) 
 {
   NS_ENSURE_ARG_POINTER(aURI);
   NS_ASSERTION(result, "must not be null");
 
-  nsCAutoString path = GetAboutModuleName(aURI);
+  nsAutoCString path = GetAboutModuleName(aURI);
 
   nsresult rv;
   nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   for (int i = 0; i < kRedirTotal; i++) {
     if (!strcmp(path.get(), kRedirMap[i].id)) {
       nsCOMPtr<nsIChannel> tempChannel;
@@ -136,17 +136,17 @@ AboutRedirector::NewChannel(nsIURI *aURI
   return NS_ERROR_ILLEGAL_VALUE;
 }
 
 NS_IMETHODIMP
 AboutRedirector::GetURIFlags(nsIURI *aURI, uint32_t *result)
 {
   NS_ENSURE_ARG_POINTER(aURI);
 
-  nsCAutoString name = GetAboutModuleName(aURI);
+  nsAutoCString name = GetAboutModuleName(aURI);
 
   for (int i = 0; i < kRedirTotal; i++) {
     if (name.Equals(kRedirMap[i].id)) {
       *result = kRedirMap[i].flags;
       return NS_OK;
     }
   }
 
--- a/browser/components/feeds/src/nsFeedSniffer.cpp
+++ b/browser/components/feeds/src/nsFeedSniffer.cpp
@@ -50,17 +50,17 @@ nsFeedSniffer::ConvertEncodedData(nsIReq
 {
   nsresult rv = NS_OK;
 
  mDecodedData = "";
  nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(request));
   if (!httpChannel)
     return NS_ERROR_NO_INTERFACE;
 
-  nsCAutoString contentEncoding;
+  nsAutoCString contentEncoding;
   httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Encoding"), 
                                  contentEncoding);
   if (!contentEncoding.IsEmpty()) {
     nsCOMPtr<nsIStreamConverterService> converterService(do_GetService(NS_STREAMCONVERTERSERVICE_CONTRACTID));
     if (converterService) {
       ToLowerCase(contentEncoding);
 
       nsCOMPtr<nsIStreamListener> converter;
@@ -200,54 +200,54 @@ nsFeedSniffer::GetMIMETypeFromContent(ns
                                       uint32_t length, 
                                       nsACString& sniffedType)
 {
   nsCOMPtr<nsIHttpChannel> channel(do_QueryInterface(request));
   if (!channel)
     return NS_ERROR_NO_INTERFACE;
 
   // Check that this is a GET request, since you can't subscribe to a POST...
-  nsCAutoString method;
+  nsAutoCString method;
   channel->GetRequestMethod(method);
   if (!method.Equals("GET")) {
     sniffedType.Truncate();
     return NS_OK;
   }
 
   // We need to find out if this is a load of a view-source document. In this
   // case we do not want to override the content type, since the source display
   // does not need to be converted from feed format to XUL. More importantly, 
   // we don't want to change the content type from something 
   // nsContentDLF::CreateInstance knows about (e.g. application/xml, text/html 
   // etc) to something that only the application fe knows about (maybe.feed) 
   // thus deactivating syntax highlighting.
   nsCOMPtr<nsIURI> originalURI;
   channel->GetOriginalURI(getter_AddRefs(originalURI));
 
-  nsCAutoString scheme;
+  nsAutoCString scheme;
   originalURI->GetScheme(scheme);
   if (scheme.EqualsLiteral("view-source")) {
     sniffedType.Truncate();
     return NS_OK;
   }
 
   // Check the Content-Type to see if it is set correctly. If it is set to 
   // something specific that we think is a reliable indication of a feed, don't
   // bother sniffing since we assume the site maintainer knows what they're 
   // doing. 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   channel->GetContentType(contentType);
   bool noSniff = contentType.EqualsLiteral(TYPE_RSS) ||
                    contentType.EqualsLiteral(TYPE_ATOM);
 
   // Check to see if this was a feed request from the location bar or from
   // the feed: protocol. This is also a reliable indication.
   // The value of the header doesn't matter.  
   if (!noSniff) {
-    nsCAutoString sniffHeader;
+    nsAutoCString sniffHeader;
     nsresult foundHeader =
       channel->GetRequestHeader(NS_LITERAL_CSTRING("X-Moz-Is-Feed"),
                                 sniffHeader);
     noSniff = NS_SUCCEEDED(foundHeader);
   }
 
   if (noSniff) {
     // check for an attachment after we have a likely feed.
--- a/browser/components/shell/src/nsGNOMEShellService.cpp
+++ b/browser/components/shell/src/nsGNOMEShellService.cpp
@@ -174,17 +174,17 @@ nsGNOMEShellService::KeyMatchesAppName(c
   return matches;
 }
 
 bool
 nsGNOMEShellService::CheckHandlerMatchesAppName(const nsACString &handler) const
 {
   gint argc;
   gchar **argv;
-  nsCAutoString command(handler);
+  nsAutoCString command(handler);
 
   // The string will be something of the form: [/path/to/]browser "%s"
   // We want to remove all of the parameters and get just the binary name.
 
   if (g_shell_parse_argv(command.get(), &argc, &argv, NULL) && argc > 0) {
     command.Assign(argv[0]);
     g_strfreev(argv);
   }
@@ -202,17 +202,17 @@ nsGNOMEShellService::IsDefaultBrowser(bo
   *aIsDefaultBrowser = false;
   if (aStartupCheck)
     mCheckedThisSession = true;
 
   nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
   nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
 
   bool enabled;
-  nsCAutoString handler;
+  nsAutoCString handler;
   nsCOMPtr<nsIGIOMimeApp> gioApp;
 
   for (unsigned int i = 0; i < ArrayLength(appProtocols); ++i) {
     if (!appProtocols[i].essential)
       continue;
 
     if (gconf) {
       handler.Truncate();
@@ -249,17 +249,17 @@ nsGNOMEShellService::SetDefaultBrowser(b
 #ifdef DEBUG
   if (aForAllUsers)
     NS_WARNING("Setting the default browser for all users is not yet supported");
 #endif
 
   nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
   nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
   if (gconf) {
-    nsCAutoString appKeyValue;
+    nsAutoCString appKeyValue;
     if (mAppIsInPath) {
       // mAppPath is in the users path, so use only the basename as the launcher
       gchar *tmp = g_path_get_basename(mAppPath.get());
       appKeyValue = tmp;
       g_free(tmp);
     } else {
       appKeyValue = mAppPath;
     }
@@ -401,30 +401,30 @@ nsGNOMEShellService::SetDesktopBackgroun
   rv = imageContent->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
                                 getter_AddRefs(request));
   if (!request) return rv;
   nsCOMPtr<imgIContainer> container;
   rv = request->GetImage(getter_AddRefs(container));
   if (!container) return rv;
 
   // Set desktop wallpaper filling style
-  nsCAutoString options;
+  nsAutoCString options;
   if (aPosition == BACKGROUND_TILE)
     options.Assign("wallpaper");
   else if (aPosition == BACKGROUND_STRETCH)
     options.Assign("stretched");
   else if (aPosition == BACKGROUND_FILL)
     options.Assign("zoom");
   else if (aPosition == BACKGROUND_FIT)
     options.Assign("scaled");
   else
     options.Assign("centered");
 
   // Write the background file to the home directory.
-  nsCAutoString filePath(PR_GetEnv("HOME"));
+  nsAutoCString filePath(PR_GetEnv("HOME"));
 
   // get the product brand name from localized strings
   nsString brandName;
   nsCID bundleCID = NS_STRINGBUNDLESERVICE_CID;
   nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(bundleCID));
   if (bundleService) {
     nsCOMPtr<nsIStringBundle> brandBundle;
     rv = bundleService->CreateBundle(BRAND_PROPERTIES,
@@ -494,17 +494,17 @@ nsGNOMEShellService::SetDesktopBackgroun
 #define COLOR_8_TO_16_BIT(_c) ((_c) << 8 | (_c))
 
 NS_IMETHODIMP
 nsGNOMEShellService::GetDesktopBackgroundColor(uint32_t *aColor)
 {
   nsCOMPtr<nsIGSettingsService> gsettings = 
     do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
   nsCOMPtr<nsIGSettingsCollection> background_settings;
-  nsCAutoString background;
+  nsAutoCString background;
 
   if (gsettings) {
     gsettings->GetCollectionForSchema(
       NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings));
     if (background_settings) {
       background_settings->GetString(NS_LITERAL_CSTRING(kDesktopColorGSKey),
                                      background);
     }
@@ -546,17 +546,17 @@ ColorToCString(uint32_t aColor, nsCStrin
 
   PR_snprintf(buf, 14, "#%04x%04x%04x", red, green, blue);
 }
 
 NS_IMETHODIMP
 nsGNOMEShellService::SetDesktopBackgroundColor(uint32_t aColor)
 {
   NS_ASSERTION(aColor <= 0xffffff, "aColor has extra bits");
-  nsCAutoString colorString;
+  nsAutoCString colorString;
   ColorToCString(aColor, colorString);
 
   nsCOMPtr<nsIGSettingsService> gsettings =
     do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
   if (gsettings) {
     nsCOMPtr<nsIGSettingsCollection> background_settings;
     gsettings->GetCollectionForSchema(
       NS_LITERAL_CSTRING(kDesktopBGSchema), getter_AddRefs(background_settings));
@@ -574,17 +574,17 @@ nsGNOMEShellService::SetDesktopBackgroun
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsGNOMEShellService::OpenApplication(int32_t aApplication)
 {
-  nsCAutoString scheme;
+  nsAutoCString scheme;
   if (aApplication == APPLICATION_MAIL)
     scheme.Assign("mailto");
   else if (aApplication == APPLICATION_NEWS)
     scheme.Assign("news");
   else
     return NS_ERROR_NOT_AVAILABLE;
 
   nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
@@ -595,17 +595,17 @@ nsGNOMEShellService::OpenApplication(int
       return gioApp->Launch(EmptyCString());
   }
 
   nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
   if (!gconf)
     return NS_ERROR_FAILURE;
 
   bool enabled;
-  nsCAutoString appCommand;
+  nsAutoCString appCommand;
   gconf->GetAppForProtocol(scheme, &enabled, appCommand);
 
   if (!enabled)
     return NS_ERROR_FAILURE;
 
   // XXX we don't currently handle launching a terminal window.
   // If the handler requires a terminal, bail.
   bool requiresTerminal;
--- a/browser/components/shell/src/nsMacShellService.cpp
+++ b/browser/components/shell/src/nsMacShellService.cpp
@@ -155,17 +155,17 @@ nsMacShellService::SetDesktopBackground(
   // Get the desired image file name
   nsCOMPtr<nsIURL> imageURL(do_QueryInterface(imageURI));
   if (!imageURL) {
     // XXXmano (bug 300293): Non-URL images (e.g. the data: protocol) are not
     // yet supported. What filename should we take here?
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
-  nsCAutoString fileName;
+  nsAutoCString fileName;
   imageURL->GetFileName(fileName);
   nsCOMPtr<nsIProperties> fileLocator
     (do_GetService("@mozilla.org/file/directory_service;1", &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get the current user's "Pictures" folder (That's ~/Pictures):
   fileLocator->Get(NS_OSX_PICTURE_DOCUMENTS_DIR, NS_GET_IID(nsIFile),
                    getter_AddRefs(mBackgroundFile));
@@ -242,17 +242,17 @@ nsMacShellService::OnStateChange(nsIWebP
     if (os)
       os->NotifyObservers(nullptr, "shell:desktop-background-changed", nullptr);
 
     bool exists = false;
     mBackgroundFile->Exists(&exists);
     if (!exists)
       return NS_OK;
 
-    nsCAutoString nativePath;
+    nsAutoCString nativePath;
     mBackgroundFile->GetNativePath(nativePath);
 
     AEDesc tAEDesc = { typeNull, nil };
     OSErr err = noErr;
     AliasHandle aliasHandle = nil;
     FSRef pictureRef;
     OSStatus status;
 
--- a/caps/src/nsNullPrincipal.cpp
+++ b/caps/src/nsNullPrincipal.cpp
@@ -108,17 +108,17 @@ void
 nsNullPrincipal::GetScriptLocation(nsACString &aStr)
 {
   mURI->GetSpec(aStr);
 }
 
 #ifdef DEBUG
 void nsNullPrincipal::dumpImpl()
 {
-  nsCAutoString str;
+  nsAutoCString str;
   mURI->GetSpec(str);
   fprintf(stderr, "nsNullPrincipal (%p) = %s\n", this, str.get());
 }
 #endif 
 
 /**
  * nsIPrincipal implementation
  */
@@ -241,17 +241,17 @@ nsNullPrincipal::SetDomain(nsIURI* aDoma
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 NS_IMETHODIMP 
 nsNullPrincipal::GetOrigin(char** aOrigin)
 {
   *aOrigin = nullptr;
   
-  nsCAutoString str;
+  nsAutoCString str;
   nsresult rv = mURI->GetSpec(str);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aOrigin = ToNewCString(str);
   NS_ENSURE_TRUE(*aOrigin, NS_ERROR_OUT_OF_MEMORY);
 
   return NS_OK;
 }
--- a/caps/src/nsNullPrincipalURI.cpp
+++ b/caps/src/nsNullPrincipalURI.cpp
@@ -50,17 +50,17 @@ nsNullPrincipalURI::GetAsciiHost(nsACStr
 {
   _host.Truncate();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNullPrincipalURI::GetAsciiSpec(nsACString &_spec)
 {
-  nsCAutoString buffer;
+  nsAutoCString buffer;
   (void)GetSpec(buffer);
   NS_EscapeURL(buffer, esc_OnlyNonASCII | esc_AlwaysCopy, _spec);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNullPrincipalURI::GetHost(nsACString &_host)
 {
--- a/caps/src/nsPrincipal.cpp
+++ b/caps/src/nsPrincipal.cpp
@@ -129,17 +129,17 @@ nsBasePrincipal::CertificateEquals(nsIPr
   if (otherHasCert != (mCert != nullptr)) {
     // One has a cert while the other doesn't.  Not equal.
     return false;
   }
 
   if (!mCert)
     return true;
 
-  nsCAutoString str;
+  nsAutoCString str;
   aOther->GetFingerprint(str);
   if (!str.Equals(mCert->fingerprint))
     return false;
 
   // If either subject name is empty, just let the result stand (so that
   // nsScriptSecurityManager::SetCanEnableCapability works), but if they're
   // both non-empty, only claim equality if they're equal.
   if (!mCert->subjectName.IsEmpty()) {
@@ -185,17 +185,17 @@ nsBasePrincipal::CanEnableCapability(con
     }
   }
 
   const char *start = capability;
   *result = nsIPrincipal::ENABLE_GRANTED;
   for(;;) {
     const char *space = PL_strchr(start, ' ');
     int32_t len = space ? space - start : strlen(start);
-    nsCAutoString capString(start, len);
+    nsAutoCString capString(start, len);
     nsCStringKey key(capString);
     int16_t value =
       mCapabilities ? (int16_t)NS_PTR_TO_INT32(mCapabilities->Get(&key)) : 0;
     if (value == 0 || value == nsIPrincipal::ENABLE_UNKNOWN) {
       // We don't know whether we can enable this capability,
       // so we should ask the user.
       value = nsIPrincipal::ENABLE_WITH_USER_PERMISSION;
     }
@@ -232,17 +232,17 @@ nsBasePrincipal::SetCanEnableCapability(
   if (PL_strcmp(capability, sInvalid) == 0) {
     mCapabilities->Reset();
   }
 
   const char *start = capability;
   for(;;) {
     const char *space = PL_strchr(start, ' ');
     int len = space ? space - start : strlen(start);
-    nsCAutoString capString(start, len);
+    nsAutoCString capString(start, len);
     nsCStringKey key(capString);
     mCapabilities->Put(&key, NS_INT32_TO_PTR(canEnable));
     if (!space) {
       break;
     }
 
     start = space + 1;
   }
@@ -258,17 +258,17 @@ nsBasePrincipal::IsCapabilityEnabled(con
   nsHashtable *ht = (nsHashtable *) annotation;
   if (!ht) {
     return NS_OK;
   }
   const char *start = capability;
   for(;;) {
     const char *space = PL_strchr(start, ' ');
     int len = space ? space - start : strlen(start);
-    nsCAutoString capString(start, len);
+    nsAutoCString capString(start, len);
     nsCStringKey key(capString);
     *result = (ht->Get(&key) == (void *) AnnotationEnabled);
     if (!*result) {
       // If any single capability is not enabled, then return false.
       return NS_OK;
     }
 
     if (!space) {
@@ -307,17 +307,17 @@ nsBasePrincipal::SetCapability(const cha
 
     *annotation = ht;
   }
 
   const char *start = capability;
   for(;;) {
     const char *space = PL_strchr(start, ' ');
     int len = space ? space - start : strlen(start);
-    nsCAutoString capString(start, len);
+    nsAutoCString capString(start, len);
     nsCStringKey key(capString);
     nsHashtable *ht = static_cast<nsHashtable *>(*annotation);
     ht->Put(&key, (void *) value);
     if (!space) {
       break;
     }
 
     start = space + 1;
@@ -519,17 +519,17 @@ nsBasePrincipal::GetPreferences(char** a
 
   if (!subjectName) {
     nsMemory::Free(prefName);
     nsMemory::Free(id);
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   //-- Capabilities
-  nsCAutoString grantedListStr, deniedListStr;
+  nsAutoCString grantedListStr, deniedListStr;
   if (mCapabilities) {
     CapabilityList capList = CapabilityList();
     capList.granted = &grantedListStr;
     capList.denied = &deniedListStr;
     mCapabilities->Enumerate(AppendCapability, (void*)&capList);
   }
 
   if (!grantedListStr.IsEmpty()) {
@@ -597,17 +597,17 @@ FreeAnnotationEntry(nsIObjectInputStream
                     void* aData)
 {
   delete aKey;
 }
 
 #ifdef DEBUG
 void nsPrincipal::dumpImpl()
 {
-  nsCAutoString str;
+  nsAutoCString str;
   GetScriptLocation(str);
   fprintf(stderr, "nsPrincipal (%p) = %s\n", static_cast<void*>(this), str.get());
 }
 #endif 
 
 NS_IMPL_CLASSINFO(nsPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY,
                   NS_PRINCIPAL_CID)
 NS_IMPL_QUERY_INTERFACE2_CI(nsPrincipal,
@@ -675,17 +675,17 @@ nsPrincipal::GetOriginForURI(nsIURI* aUR
 
   *aOrigin = nullptr;
 
   nsCOMPtr<nsIURI> origin = NS_GetInnermostURI(aURI);
   if (!origin) {
     return NS_ERROR_FAILURE;
   }
 
-  nsCAutoString hostPort;
+  nsAutoCString hostPort;
 
   // chrome: URLs don't have a meaningful origin, so make
   // sure we just get the full spec for them.
   // XXX this should be removed in favor of the solution in
   // bug 160042.
   bool isChrome;
   nsresult rv = origin->SchemeIs("chrome", &isChrome);
   if (NS_SUCCEEDED(rv) && !isChrome) {
@@ -703,26 +703,26 @@ nsPrincipal::GetOriginForURI(nsIURI* aUR
   }
 
   if (NS_SUCCEEDED(rv) && !isChrome) {
     if (port != -1) {
       hostPort.AppendLiteral(":");
       hostPort.AppendInt(port, 10);
     }
 
-    nsCAutoString scheme;
+    nsAutoCString scheme;
     rv = origin->GetScheme(scheme);
     NS_ENSURE_SUCCESS(rv, rv);
 
     *aOrigin = ToNewCString(scheme + NS_LITERAL_CSTRING("://") + hostPort);
   }
   else {
     // Some URIs (e.g., nsSimpleURI) don't support asciiHost. Just
     // get the full spec.
-    nsCAutoString spec;
+    nsAutoCString spec;
     // XXX nsMozIconURI and nsJARURI don't implement this correctly, they
     // both fall back to GetSpec.  That needs to be fixed.
     rv = origin->GetAsciiSpec(spec);
     NS_ENSURE_SUCCESS(rv, rv);
 
     *aOrigin = ToNewCString(spec);
   }
 
@@ -1314,30 +1314,30 @@ nsPrincipal::GetAppStatus()
   appsService->GetAppByLocalId(mAppId, getter_AddRefs(domApp));
   nsCOMPtr<mozIApplication> app = do_QueryInterface(domApp);
   NS_ENSURE_TRUE(app, nsIPrincipal::APP_STATUS_NOT_INSTALLED);
 
   uint16_t status = nsIPrincipal::APP_STATUS_INSTALLED;
   NS_ENSURE_SUCCESS(app->GetAppStatus(&status),
                     nsIPrincipal::APP_STATUS_NOT_INSTALLED);
 
-  nsCAutoString origin;
+  nsAutoCString origin;
   NS_ENSURE_SUCCESS(GetOrigin(getter_Copies(origin)),
                     nsIPrincipal::APP_STATUS_NOT_INSTALLED);
   nsString appOrigin;
   NS_ENSURE_SUCCESS(app->GetOrigin(appOrigin),
                     nsIPrincipal::APP_STATUS_NOT_INSTALLED);
 
   // We go from string -> nsIURI -> origin to be sure we
   // compare two punny-encoded origins.
   nsCOMPtr<nsIURI> appURI;
   NS_ENSURE_SUCCESS(NS_NewURI(getter_AddRefs(appURI), appOrigin),
                     nsIPrincipal::APP_STATUS_NOT_INSTALLED);
 
-  nsCAutoString appOriginPunned;
+  nsAutoCString appOriginPunned;
   NS_ENSURE_SUCCESS(GetOriginForURI(appURI, getter_Copies(appOriginPunned)),
                     nsIPrincipal::APP_STATUS_NOT_INSTALLED);
 
   if (!appOriginPunned.Equals(origin)) {
     return nsIPrincipal::APP_STATUS_NOT_INSTALLED;
   }
 
   return status;
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -118,21 +118,21 @@ GetOriginFromURI(nsIURI* aURI, nsACStrin
       return NS_ERROR_NOT_AVAILABLE;
   }
 
   nsAutoInPrincipalDomainOriginSetter autoSetter;
 
   nsCOMPtr<nsIURI> uri = NS_GetInnermostURI(aURI);
   NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
 
-  nsCAutoString hostPort;
+  nsAutoCString hostPort;
 
   nsresult rv = uri->GetHostPort(hostPort);
   if (NS_SUCCEEDED(rv)) {
-    nsCAutoString scheme;
+    nsAutoCString scheme;
     rv = uri->GetScheme(scheme);
     NS_ENSURE_SUCCESS(rv, rv);
     aOrigin = scheme + NS_LITERAL_CSTRING("://") + hostPort;
   }
   else {
     // Some URIs (e.g., nsSimpleURI) don't support host. Just
     // get the full spec.
     rv = uri->GetSpec(aOrigin);
@@ -663,17 +663,17 @@ nsScriptSecurityManager::CheckPropertyAc
         return NS_OK;
 
     nsCOMPtr<nsIPrincipal> objectPrincipal;
 
     // Hold the class info data here so we don't have to go back to virtual
     // methods all the time
     ClassInfoData classInfoData(aClassInfo, aClassName);
 #ifdef DEBUG_CAPS_CheckPropertyAccessImpl
-    nsCAutoString propertyName;
+    nsAutoCString propertyName;
     propertyName.AssignWithConversion((PRUnichar*)IDToString(cx, aProperty));
     printf("### CanAccess(%s.%s, %i) ", classInfoData.GetName(), 
            propertyName.get(), aAction);
 #endif
 
     //-- Look up the security policy for this class and subject domain
     SecurityLevel securityLevel;
     rv = LookupPolicy(subjectPrincipal, classInfoData, aProperty, aAction, 
@@ -825,36 +825,36 @@ nsScriptSecurityManager::CheckPropertyAc
         }
 
         // Null out objectPrincipal for now, so we don't leak information about
         // it.  Whenever we can report different error strings to content and
         // the UI we can take this out again.
         objectPrincipal = nullptr;
 
         NS_ConvertUTF8toUTF16 className(classInfoData.GetName());
-        nsCAutoString subjectOrigin;
-        nsCAutoString subjectDomain;
+        nsAutoCString subjectOrigin;
+        nsAutoCString subjectDomain;
         if (!nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin) {
             nsCOMPtr<nsIURI> uri, domain;
             subjectPrincipal->GetURI(getter_AddRefs(uri));
             if (uri) { // Object principal might be expanded
                 GetOriginFromURI(uri, subjectOrigin);
             }
             subjectPrincipal->GetDomain(getter_AddRefs(domain));
             if (domain) {
                 GetOriginFromURI(domain, subjectDomain);
             }
         } else {
             subjectOrigin.AssignLiteral("the security manager");
         }
         NS_ConvertUTF8toUTF16 subjectOriginUnicode(subjectOrigin);
         NS_ConvertUTF8toUTF16 subjectDomainUnicode(subjectDomain);
 
-        nsCAutoString objectOrigin;
-        nsCAutoString objectDomain;
+        nsAutoCString objectOrigin;
+        nsAutoCString objectDomain;
         if (!nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin &&
             objectPrincipal) {
             nsCOMPtr<nsIURI> uri, domain;
             objectPrincipal->GetURI(getter_AddRefs(uri));
             if (uri) { // Object principal might be system
                 GetOriginFromURI(uri, objectOrigin);
             }
             objectPrincipal->GetDomain(getter_AddRefs(domain));
@@ -1060,17 +1060,17 @@ nsScriptSecurityManager::LookupPolicy(ns
         if (nsCOMPtr<nsIExpandedPrincipal> exp = do_QueryInterface(aPrincipal)) 
         {
             // For expanded principals domain origin is not defined so let's just
             // use the default policy
             dpolicy = mDefaultPolicy;
         }
         else
         {
-            nsCAutoString origin;
+            nsAutoCString origin;
             rv = GetPrincipalDomainOrigin(aPrincipal, origin);
             NS_ENSURE_SUCCESS(rv, rv);
  
             char *start = origin.BeginWriting();
             const char *nextToLastDot = nullptr;
             const char *lastDot = nullptr;
             const char *colon = nullptr;
             char *p = start;
@@ -1091,17 +1091,17 @@ nsScriptSecurityManager::LookupPolicy(ns
                 else if (!colon && *p == ':')
                     colon = p;
             }
 
             nsCStringKey key(nextToLastDot ? nextToLastDot+1 : start);
             DomainEntry *de = (DomainEntry*) mOriginToPolicyMap->Get(&key);
             if (!de)
             {
-                nsCAutoString scheme(start, colon-start+1);
+                nsAutoCString scheme(start, colon-start+1);
                 nsCStringKey schemeKey(scheme);
                 de = (DomainEntry*) mOriginToPolicyMap->Get(&schemeKey);
             }
 
             while (de)
             {
                 if (de->Matches(start))
                 {
@@ -1256,20 +1256,20 @@ nsScriptSecurityManager::CheckLoadURIFro
         bool enabled;
         if (NS_FAILED(IsCapabilityEnabled("UniversalXPConnect", &enabled)))
             return NS_ERROR_FAILURE;
         if (enabled)
             return NS_OK;
     }
 
     // Report error.
-    nsCAutoString spec;
+    nsAutoCString spec;
     if (NS_FAILED(aURI->GetAsciiSpec(spec)))
         return NS_ERROR_FAILURE;
-    nsCAutoString msg("Access to '");
+    nsAutoCString msg("Access to '");
     msg.Append(spec);
     msg.AppendLiteral("' from script denied");
     SetPendingException(cx, msg.get());
     return NS_ERROR_DOM_BAD_URI;
 }
 
 /**
  * Helper method to handle cases where a flag passed to
@@ -1357,17 +1357,17 @@ nsScriptSecurityManager::CheckLoadURIWit
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
     // If either URI is a nested URI, get the base URI
     nsCOMPtr<nsIURI> sourceBaseURI = NS_GetInnermostURI(sourceURI);
     nsCOMPtr<nsIURI> targetBaseURI = NS_GetInnermostURI(aTargetURI);
 
     //-- get the target scheme
-    nsCAutoString targetScheme;
+    nsAutoCString targetScheme;
     nsresult rv = targetBaseURI->GetScheme(targetScheme);
     if (NS_FAILED(rv)) return rv;
 
     //-- Some callers do not allow loading javascript:
     if ((aFlags & nsIScriptSecurityManager::DISALLOW_SCRIPT) &&
          targetScheme.EqualsLiteral("javascript"))
     {
        return NS_ERROR_DOM_BAD_URI;
@@ -1382,17 +1382,17 @@ nsScriptSecurityManager::CheckLoadURIWit
                              &hasFlags);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (hasFlags) {
         return aPrincipal->CheckMayLoad(targetBaseURI, true, false);
     }
 
     //-- get the source scheme
-    nsCAutoString sourceScheme;
+    nsAutoCString sourceScheme;
     rv = sourceBaseURI->GetScheme(sourceScheme);
     if (NS_FAILED(rv)) return rv;
 
     if (sourceScheme.LowerCaseEqualsLiteral(NS_NULLPRINCIPAL_SCHEME)) {
         // A null principal can target its own URI.
         if (sourceURI == aTargetURI) {
             return NS_OK;
         }
@@ -1531,22 +1531,22 @@ nsScriptSecurityManager::CheckLoadURIWit
 nsresult
 nsScriptSecurityManager::ReportError(JSContext* cx, const nsAString& messageTag,
                                      nsIURI* aSource, nsIURI* aTarget)
 {
     nsresult rv;
     NS_ENSURE_TRUE(aSource && aTarget, NS_ERROR_NULL_POINTER);
 
     // Get the source URL spec
-    nsCAutoString sourceSpec;
+    nsAutoCString sourceSpec;
     rv = aSource->GetAsciiSpec(sourceSpec);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Get the target URL spec
-    nsCAutoString targetSpec;
+    nsAutoCString targetSpec;
     rv = aTarget->GetAsciiSpec(targetSpec);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Localize the error message
     nsXPIDLString message;
     NS_ConvertASCIItoUTF16 ucsSourceSpec(sourceSpec);
     NS_ConvertASCIItoUTF16 ucsTargetSpec(targetSpec);
     const PRUnichar *formatStrings[] = { ucsSourceSpec.get(), ucsTargetSpec.get() };
@@ -2557,17 +2557,17 @@ nsScriptSecurityManager::EnableCapabilit
         return NS_OK;
 
     int16_t canEnable;
     if (NS_FAILED(RequestCapability(principal, capability, &canEnable)))
         return NS_ERROR_FAILURE;
 
     if (canEnable != nsIPrincipal::ENABLE_GRANTED)
     {
-        nsCAutoString val;
+        nsAutoCString val;
         bool hasCert;
         nsresult rv;
         principal->GetHasCertificate(&hasCert);
         if (hasCert)
             rv = principal->GetPrettyName(val);
         else
             rv = GetPrincipalDomainOrigin(principal, val);
 
@@ -2631,17 +2631,17 @@ nsScriptSecurityManager::CanCreateWrappe
     if (checkedComponent)
         checkedComponent->CanCreateWrapper((nsIID *)&aIID, getter_Copies(objectSecurityLevel));
 
     nsresult rv = CheckXPCPermissions(cx, aObj, nullptr, nullptr, objectSecurityLevel);
     if (NS_FAILED(rv))
     {
         //-- Access denied, report an error
         NS_ConvertUTF8toUTF16 strName("CreateWrapperDenied");
-        nsCAutoString origin;
+        nsAutoCString origin;
         nsresult rv2;
         nsIPrincipal* subjectPrincipal = doGetSubjectPrincipal(&rv2);
         if (NS_SUCCEEDED(rv2) && subjectPrincipal) {
             GetPrincipalDomainOrigin(subjectPrincipal, origin);
         }
         NS_ConvertUTF8toUTF16 originUnicode(origin);
         NS_ConvertUTF8toUTF16 className(objClassInfo.GetName());
         const PRUnichar* formatStrings[] = {
@@ -2687,17 +2687,17 @@ nsScriptSecurityManager::CanCreateInstan
     printf("### CanCreateInstance(%s) ", cidStr);
     NS_Free(cidStr);
 #endif
 
     nsresult rv = CheckXPCPermissions(nullptr, nullptr, nullptr, nullptr, nullptr);
     if (NS_FAILED(rv))
     {
         //-- Access denied, report an error
-        nsCAutoString errorMsg("Permission denied to create instance of class. CID=");
+        nsAutoCString errorMsg("Permission denied to create instance of class. CID=");
         char cidStr[NSID_LENGTH];
         aCID.ToProvidedString(cidStr);
         errorMsg.Append(cidStr);
         SetPendingException(cx, errorMsg.get());
 
 #ifdef DEBUG_CAPS_CanCreateInstance
         printf("DENIED\n");
     }
@@ -2718,17 +2718,17 @@ nsScriptSecurityManager::CanGetService(J
     printf("### CanGetService(%s) ", cidStr);
     NS_Free(cidStr);
 #endif
 
     nsresult rv = CheckXPCPermissions(nullptr, nullptr, nullptr, nullptr, nullptr);
     if (NS_FAILED(rv))
     {
         //-- Access denied, report an error
-        nsCAutoString errorMsg("Permission denied to get service. CID=");
+        nsAutoCString errorMsg("Permission denied to get service. CID=");
         char cidStr[NSID_LENGTH];
         aCID.ToProvidedString(cidStr);
         errorMsg.Append(cidStr);
         SetPendingException(cx, errorMsg.get());
 
 #ifdef DEBUG_CAPS_CanGetService
         printf("DENIED\n");
     }
@@ -3130,17 +3130,17 @@ nsScriptSecurityManager::InitPolicies()
 
         while(*policyCurrent != '\0' && *policyCurrent != ' ' && *policyCurrent != ',')
             policyCurrent++;
 
         morePolicies = (*policyCurrent != '\0');
         *policyCurrent = '\0';
         policyCurrent++;
 
-        nsCAutoString sitesPrefName(
+        nsAutoCString sitesPrefName(
             NS_LITERAL_CSTRING(sPolicyPrefix) +
             nsDependentCString(nameBegin) +
             NS_LITERAL_CSTRING(".sites"));
         nsAdoptingCString domainList =
             Preferences::GetCString(sitesPrefName.get());
         if (!domainList) {
             continue;
         }
@@ -3232,17 +3232,17 @@ nsScriptSecurityManager::InitPolicies()
 
 
 nsresult
 nsScriptSecurityManager::InitDomainPolicy(JSContext* cx,
                                           const char* aPolicyName,
                                           DomainPolicy* aDomainPolicy)
 {
     nsresult rv;
-    nsCAutoString policyPrefix(NS_LITERAL_CSTRING(sPolicyPrefix) +
+    nsAutoCString policyPrefix(NS_LITERAL_CSTRING(sPolicyPrefix) +
                                nsDependentCString(aPolicyName) +
                                NS_LITERAL_CSTRING("."));
     uint32_t prefixLength = policyPrefix.Length() - 1; // subtract the '.'
 
     uint32_t prefCount;
     char** prefNames;
     nsIPrefBranch* branch = Preferences::GetRootBranch();
     NS_ASSERTION(branch, "failed to get the root pref branch");
@@ -3425,19 +3425,19 @@ nsScriptSecurityManager::InitPrincipals(
         if (PL_strcasecmp(aPrefNames[c] + prefNameLen, idSuffix) != 0)
             continue;
 
         nsAdoptingCString id = Preferences::GetCString(aPrefNames[c]);
         if (!id) {
             return NS_ERROR_FAILURE;
         }
 
-        nsCAutoString grantedPrefName;
-        nsCAutoString deniedPrefName;
-        nsCAutoString subjectNamePrefName;
+        nsAutoCString grantedPrefName;
+        nsAutoCString deniedPrefName;
+        nsAutoCString subjectNamePrefName;
         nsresult rv = GetPrincipalPrefNames(aPrefNames[c],
                                             grantedPrefName,
                                             deniedPrefName,
                                             subjectNamePrefName);
         if (rv == NS_ERROR_OUT_OF_MEMORY)
             return rv;
         if (NS_FAILED(rv))
             continue;
@@ -3557,17 +3557,17 @@ GetExtendedOrigin(nsIURI* aURI, uint32_t
 {
   MOZ_ASSERT(aURI);
   MOZ_ASSERT(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID);
 
   if (aAppId == nsIScriptSecurityManager::UNKNOWN_APP_ID) {
     aAppId = nsIScriptSecurityManager::NO_APP_ID;
   }
 
-  nsCAutoString origin;
+  nsAutoCString origin;
   nsPrincipal::GetOriginForURI(aURI, getter_Copies(origin));
 
   // Fallback.
   if (aAppId == nsIScriptSecurityManager::NO_APP_ID && !aInMozBrowser) {
     aExtendedOrigin.Assign(origin);
     return;
   }
 
@@ -3601,17 +3601,17 @@ nsScriptSecurityManager::GetExtendedOrig
 //typedef PLDHashOperator
 //(* PLDHashEnumerator)(PLDHashTable *table, PLDHashEntryHdr *hdr,
 //                      uint32_t number, void *arg);
 static PLDHashOperator
 PrintPropertyPolicy(PLDHashTable *table, PLDHashEntryHdr *entry,
                     uint32_t number, void *arg)
 {
     PropertyPolicy* pp = (PropertyPolicy*)entry;
-    nsCAutoString prop("        ");
+    nsAutoCString prop("        ");
     JSContext* cx = (JSContext*)arg;
     prop.AppendInt((uint32_t)pp->key);
     prop += ' ';
     LossyAppendUTF16toASCII((PRUnichar*)JS_GetStringChars(pp->key), prop);
     prop += ": Get=";
     if (SECURITY_ACCESS_LEVEL_FLAG(pp->mGet))
         prop.AppendInt(pp->mGet.level);
     else
--- a/chrome/src/nsChromeProtocolHandler.cpp
+++ b/chrome/src/nsChromeProtocolHandler.cpp
@@ -146,17 +146,17 @@ nsChromeProtocolHandler::NewChannel(nsIU
             mozilla::services::GetChromeRegistryService();
         NS_ENSURE_TRUE(nsChromeRegistry::gChromeRegistry, NS_ERROR_FAILURE);
     }
 
     nsCOMPtr<nsIURI> resolvedURI;
     rv = nsChromeRegistry::gChromeRegistry->ConvertChromeURL(aURI, getter_AddRefs(resolvedURI));
     if (NS_FAILED(rv)) {
 #ifdef DEBUG
-        nsCAutoString spec;
+        nsAutoCString spec;
         aURI->GetSpec(spec);
         printf("Couldn't convert chrome URL: %s\n", spec.get());
 #endif
         return rv;
     }
 
     nsCOMPtr<nsIIOService> ioServ(do_GetIOService(&rv));
     NS_ENSURE_SUCCESS(rv, rv);
@@ -168,17 +168,17 @@ nsChromeProtocolHandler::NewChannel(nsIU
     nsCOMPtr<nsIFileChannel> fileChan(do_QueryInterface(result));
     if (fileChan) {
         nsCOMPtr<nsIFile> file;
         fileChan->GetFile(getter_AddRefs(file));
 
         bool exists = false;
         file->Exists(&exists);
         if (!exists) {
-            nsCAutoString path;
+            nsAutoCString path;
             file->GetNativePath(path);
             printf("Chrome file doesn't exist: %s\n", path.get());
         }
     }
 #endif
 
     // Make sure that the channel remembers where it was
     // originally loaded from.
@@ -186,17 +186,17 @@ nsChromeProtocolHandler::NewChannel(nsIU
     result->GetLoadFlags(&loadFlags);
     result->SetLoadFlags(loadFlags & ~nsIChannel::LOAD_REPLACE);
     rv = result->SetOriginalURI(aURI);
     if (NS_FAILED(rv)) return rv;
 
     // Get a system principal for content files and set the owner
     // property of the result
     nsCOMPtr<nsIURL> url = do_QueryInterface(aURI);
-    nsCAutoString path;
+    nsAutoCString path;
     rv = url->GetPath(path);
     if (StringBeginsWith(path, NS_LITERAL_CSTRING("/content/")))
     {
         nsCOMPtr<nsIScriptSecurityManager> securityManager =
                  do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
         if (NS_FAILED(rv)) return rv;
 
         nsCOMPtr<nsIPrincipal> principal;
--- a/chrome/src/nsChromeRegistry.cpp
+++ b/chrome/src/nsChromeRegistry.cpp
@@ -160,17 +160,17 @@ nsChromeRegistry::GetProviderAndPath(nsI
   nsresult rv;
 
 #ifdef DEBUG
   bool isChrome;
   aChromeURL->SchemeIs("chrome", &isChrome);
   NS_ASSERTION(isChrome, "Non-chrome URI?");
 #endif
 
-  nsCAutoString path;
+  nsAutoCString path;
   rv = aChromeURL->GetPath(path);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (path.Length() < 3) {
     LogMessage("Invalid chrome URI: %s", path.get());
     return NS_ERROR_FAILURE;
   }
 
@@ -202,22 +202,22 @@ nsChromeRegistry::GetProviderAndPath(nsI
 
 nsresult
 nsChromeRegistry::Canonify(nsIURL* aChromeURL)
 {
   NS_NAMED_LITERAL_CSTRING(kSlash, "/");
 
   nsresult rv;
 
-  nsCAutoString provider, path;
+  nsAutoCString provider, path;
   rv = GetProviderAndPath(aChromeURL, provider, path);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (path.IsEmpty()) {
-    nsCAutoString package;
+    nsAutoCString package;
     rv = aChromeURL->GetHost(package);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // we re-use the "path" local string to build a new URL path
     path.Assign(kSlash + provider + kSlash + package);
     if (provider.EqualsLiteral("content")) {
       path.AppendLiteral(".xul");
     }
@@ -272,17 +272,17 @@ nsChromeRegistry::ConvertChromeURL(nsIUR
   NS_ASSERTION(aChromeURI, "null url!");
 
   if (mOverrideTable.Get(aChromeURI, aResult))
     return NS_OK;
 
   nsCOMPtr<nsIURL> chromeURL (do_QueryInterface(aChromeURI));
   NS_ENSURE_TRUE(chromeURL, NS_NOINTERFACE);
 
-  nsCAutoString package, provider, path;
+  nsAutoCString package, provider, path;
   rv = chromeURL->GetHostPort(package);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = GetProviderAndPath(chromeURL, provider, path);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsIURI* baseURI = GetBaseURIFromPackage(package, provider, path);
 
@@ -559,17 +559,17 @@ nsChromeRegistry::AllowScriptsForPackage
   bool isChrome;
   aChromeURI->SchemeIs("chrome", &isChrome);
   NS_ASSERTION(isChrome, "Non-chrome URI passed to AllowScriptsForPackage!");
 #endif
 
   nsCOMPtr<nsIURL> url (do_QueryInterface(aChromeURI));
   NS_ENSURE_TRUE(url, NS_NOINTERFACE);
 
-  nsCAutoString provider, file;
+  nsAutoCString provider, file;
   rv = GetProviderAndPath(url, provider, file);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!provider.EqualsLiteral("skin"))
     *aResult = true;
 
   return NS_OK;
 }
@@ -588,17 +588,17 @@ nsChromeRegistry::AllowContentToAccess(n
 #endif
 
   nsCOMPtr<nsIURL> url = do_QueryInterface(aURI);
   if (!url) {
     NS_ERROR("Chrome URL doesn't implement nsIURL.");
     return NS_ERROR_UNEXPECTED;
   }
 
-  nsCAutoString package;
+  nsAutoCString package;
   rv = url->GetHostPort(package);
   NS_ENSURE_SUCCESS(rv, rv);
 
   uint32_t flags;
   rv = GetFlagsFromPackage(package, &flags);
 
   if (NS_SUCCEEDED(rv)) {
     *aResult = !!(flags & CONTENT_ACCESSIBLE);
@@ -613,17 +613,17 @@ nsChromeRegistry::WrappersEnabled(nsIURI
   if (!chromeURL)
     return false;
 
   bool isChrome = false;
   nsresult rv = chromeURL->SchemeIs("chrome", &isChrome);
   if (NS_FAILED(rv) || !isChrome)
     return false;
 
-  nsCAutoString package;
+  nsAutoCString package;
   rv = chromeURL->GetHostPort(package);
   if (NS_FAILED(rv))
     return false;
 
   uint32_t flags;
   rv = GetFlagsFromPackage(package, &flags);
   return NS_SUCCEEDED(rv) && (flags & XPCNATIVEWRAPPERS);
 }
--- a/chrome/src/nsChromeRegistryChrome.cpp
+++ b/chrome/src/nsChromeRegistryChrome.cpp
@@ -232,35 +232,35 @@ getUILangCountry(nsACString& aUILang)
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsChromeRegistryChrome::IsLocaleRTL(const nsACString& package, bool *aResult)
 {
   *aResult = false;
 
-  nsCAutoString locale;
+  nsAutoCString locale;
   GetSelectedLocale(package, locale);
   if (locale.Length() < 2)
     return NS_OK;
 
   // first check the intl.uidirection.<locale> preference, and if that is not
   // set, check the same preference but with just the first two characters of
   // the locale. If that isn't set, default to left-to-right.
-  nsCAutoString prefString = NS_LITERAL_CSTRING("intl.uidirection.") + locale;
+  nsAutoCString prefString = NS_LITERAL_CSTRING("intl.uidirection.") + locale;
   nsCOMPtr<nsIPrefBranch> prefBranch (do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (!prefBranch)
     return NS_OK;
   
   nsXPIDLCString dir;
   prefBranch->GetCharPref(prefString.get(), getter_Copies(dir));
   if (dir.IsEmpty()) {
     int32_t hyphen = prefString.FindChar('-');
     if (hyphen >= 1) {
-      nsCAutoString shortPref(Substring(prefString, 0, hyphen));
+      nsAutoCString shortPref(Substring(prefString, 0, hyphen));
       prefBranch->GetCharPref(shortPref.get(), getter_Copies(dir));
     }
   }
   *aResult = dir.EqualsLiteral("rtl");
   return NS_OK;
 }
 
 nsresult
@@ -286,17 +286,17 @@ nsresult
 nsChromeRegistryChrome::SelectLocaleFromPref(nsIPrefBranch* prefs)
 {
   nsresult rv;
   bool matchOSLocale = false;
   rv = prefs->GetBoolPref(MATCH_OS_LOCALE_PREF, &matchOSLocale);
 
   if (NS_SUCCEEDED(rv) && matchOSLocale) {
     // compute lang and region code only when needed!
-    nsCAutoString uiLocale;
+    nsAutoCString uiLocale;
     rv = getUILangCountry(uiLocale);
     if (NS_SUCCEEDED(rv))
       mSelectedLocale = uiLocale;
   }
   else {
     nsXPIDLCString provider;
     rv = prefs->GetCharPref(SELECTED_LOCALE_PREF, getter_Copies(provider));
     if (NS_SUCCEEDED(rv)) {
--- a/content/base/src/FragmentOrElement.cpp
+++ b/content/base/src/FragmentOrElement.cpp
@@ -1692,17 +1692,17 @@ static const char* kNSURIs[] = {
   " (XML Events)"
 };
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement)
   if (NS_UNLIKELY(cb.WantDebugInfo())) {
     char name[512];
     uint32_t nsid = tmp->GetNameSpaceID();
     nsAtomCString localName(tmp->NodeInfo()->NameAtom());
-    nsCAutoString uri;
+    nsAutoCString uri;
     if (tmp->OwnerDoc()->GetDocumentURI()) {
       tmp->OwnerDoc()->GetDocumentURI()->GetSpec(uri);
     }
 
     nsAutoString id;
     nsIAtom* idAtom = tmp->GetID();
     if (idAtom) {
       id.AppendLiteral(" id='");
--- a/content/base/src/Link.cpp
+++ b/content/base/src/Link.cpp
@@ -281,17 +281,17 @@ Link::SetHash(const nsAString &aHash)
 nsresult
 Link::GetProtocol(nsAString &_protocol)
 {
   nsCOMPtr<nsIURI> uri(GetURI());
   if (!uri) {
     _protocol.AssignLiteral("http");
   }
   else {
-    nsCAutoString scheme;
+    nsAutoCString scheme;
     (void)uri->GetScheme(scheme);
     CopyASCIItoUTF16(scheme, _protocol);
   }
   _protocol.Append(PRUnichar(':'));
   return NS_OK;
 }
 
 nsresult
@@ -300,17 +300,17 @@ Link::GetHost(nsAString &_host)
   _host.Truncate();
 
   nsCOMPtr<nsIURI> uri(GetURI());
   if (!uri) {
     // Do not throw!  Not having a valid URI should result in an empty string.
     return NS_OK;
   }
 
-  nsCAutoString hostport;
+  nsAutoCString hostport;
   nsresult rv = uri->GetHostPort(hostport);
   if (NS_SUCCEEDED(rv)) {
     CopyUTF8toUTF16(hostport, _host);
   }
   return NS_OK;
 }
 
 nsresult
@@ -319,17 +319,17 @@ Link::GetHostname(nsAString &_hostname)
   _hostname.Truncate();
 
   nsCOMPtr<nsIURI> uri(GetURI());
   if (!uri) {
     // Do not throw!  Not having a valid URI should result in an empty string.
     return NS_OK;
   }
 
-  nsCAutoString host;
+  nsAutoCString host;
   nsresult rv = uri->GetHost(host);
   // Note that failure to get the host from the URI is not necessarily a bad
   // thing.  Some URIs do not have a host.
   if (NS_SUCCEEDED(rv)) {
     CopyUTF8toUTF16(host, _hostname);
   }
   return NS_OK;
 }
@@ -342,17 +342,17 @@ Link::GetPathname(nsAString &_pathname)
   nsCOMPtr<nsIURI> uri(GetURI());
   nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
   if (!url) {
     // Do not throw!  Not having a valid URI or URL should result in an empty
     // string.
     return NS_OK;
   }
 
-  nsCAutoString file;
+  nsAutoCString file;
   nsresult rv = url->GetFilePath(file);
   NS_ENSURE_SUCCESS(rv, rv);
   CopyUTF8toUTF16(file, _pathname);
   return NS_OK;
 }
 
 nsresult
 Link::GetSearch(nsAString &_search)
@@ -362,17 +362,17 @@ Link::GetSearch(nsAString &_search)
   nsCOMPtr<nsIURI> uri(GetURI());
   nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
   if (!url) {
     // Do not throw!  Not having a valid URI or URL should result in an empty
     // string.
     return NS_OK;
   }
 
-  nsCAutoString search;
+  nsAutoCString search;
   nsresult rv = url->GetQuery(search);
   if (NS_SUCCEEDED(rv) && !search.IsEmpty()) {
     CopyUTF8toUTF16(NS_LITERAL_CSTRING("?") + search, _search);
   }
   return NS_OK;
 }
 
 nsresult
@@ -405,17 +405,17 @@ Link::GetHash(nsAString &_hash)
 
   nsCOMPtr<nsIURI> uri(GetURI());
   if (!uri) {
     // Do not throw!  Not having a valid URI should result in an empty
     // string.
     return NS_OK;
   }
 
-  nsCAutoString ref;
+  nsAutoCString ref;
   nsresult rv = uri->GetRef(ref);
   if (NS_SUCCEEDED(rv) && !ref.IsEmpty()) {
     NS_UnescapeURL(ref); // XXX may result in random non-ASCII bytes!
     _hash.Assign(PRUnichar('#'));
     AppendUTF8toUTF16(ref, _hash);
   }
   return NS_OK;
 }
@@ -487,17 +487,17 @@ Link::GetURIToMutate()
   return clone.forget();
 }
 
 void
 Link::SetHrefAttribute(nsIURI *aURI)
 {
   NS_ASSERTION(aURI, "Null URI is illegal!");
 
-  nsCAutoString href;
+  nsAutoCString href;
   (void)aURI->GetSpec(href);
   (void)mElement->SetAttr(kNameSpaceID_None, nsGkAtoms::href,
                           NS_ConvertUTF8toUTF16(href), true);
 }
 
 size_t
 Link::SizeOfExcludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
--- a/content/base/src/nsCSPService.cpp
+++ b/content/base/src/nsCSPService.cpp
@@ -60,17 +60,17 @@ CSPService::ShouldLoad(uint32_t aContent
                        nsIPrincipal *aRequestPrincipal,
                        int16_t *aDecision)
 {
     if (!aContentLocation)
         return NS_ERROR_FAILURE;
 
 #ifdef PR_LOGGING
     {
-        nsCAutoString location;
+        nsAutoCString location;
         aContentLocation->GetSpec(location);
         PR_LOG(gCspPRLog, PR_LOG_DEBUG,
             ("CSPService::ShouldLoad called for %s", location.get()));
     }
 #endif
     // default decision, CSP can revise it if there's a policy to enforce
     *aDecision = nsIContentPolicy::ACCEPT;
 
@@ -103,17 +103,17 @@ CSPService::ShouldLoad(uint32_t aContent
                             aRequestContext,
                             aMimeTypeGuess,
                             nullptr,
                             aDecision);
         }
     }
 #ifdef PR_LOGGING
     else {
-        nsCAutoString uriSpec;
+        nsAutoCString uriSpec;
         aContentLocation->GetSpec(uriSpec);
         PR_LOG(gCspPRLog, PR_LOG_DEBUG,
             ("COULD NOT get nsINode for location: %s", uriSpec.get()));
     }
 #endif
 
     return NS_OK;
 }
@@ -162,17 +162,17 @@ CSPService::ShouldProcess(uint32_t      
                                aRequestContext,
                                aMimeTypeGuess,
                                aExtra,
                                aDecision);
         }
     }
 #ifdef PR_LOGGING
     else {
-        nsCAutoString uriSpec;
+        nsAutoCString uriSpec;
         aContentLocation->GetSpec(uriSpec);
         PR_LOG(gCspPRLog, PR_LOG_DEBUG,
             ("COULD NOT get nsINode for location: %s", uriSpec.get()));
     }
 #endif
     return NS_OK;
 }
 
@@ -229,17 +229,17 @@ CSPService::AsyncOnChannelRedirect(nsICh
                   nullptr,          // nsIURI
                   nullptr,          // nsISupports
                   EmptyCString(),  // ACString - MIME guess
                   originalUri,     // nsISupports - extra
                   &aDecision);
 
 #ifdef PR_LOGGING
   if (newUri) {
-    nsCAutoString newUriSpec("None");
+    nsAutoCString newUriSpec("None");
     newUri->GetSpec(newUriSpec);
     PR_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSPService::AsyncOnChannelRedirect called for %s",
             newUriSpec.get()));
   }
   if (aDecision == 1)
     PR_LOG(gCspPRLog, PR_LOG_DEBUG,
            ("CSPService::AsyncOnChannelRedirect ALLOWING request."));
@@ -263,17 +263,17 @@ CSPService::AsyncOnChannelRedirect(nsICh
                                         channelPolicy);
     if (NS_SUCCEEDED(rv)) {
       return NS_OK;
     }
   }
 
   // The redirecting channel isn't a writable property bag, we won't be able
   // to enforce the load policy if it redirects again, so we stop it now.
-  nsCAutoString newUriSpec;
+  nsAutoCString newUriSpec;
   rv = newUri->GetSpec(newUriSpec);
   const PRUnichar *formatParams[] = { NS_ConvertUTF8toUTF16(newUriSpec).get() };
   if (NS_SUCCEEDED(rv)) {
     nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
                                     "Redirect Error", nullptr,
                                     nsContentUtils::eDOM_PROPERTIES,
                                     "InvalidRedirectChannelWarning",
                                     formatParams, 1);
--- a/content/base/src/nsContentAreaDragDrop.cpp
+++ b/content/base/src/nsContentAreaDragDrop.cpp
@@ -286,17 +286,17 @@ DragDataProducer::GetAnchorURL(nsIConten
 {
   nsCOMPtr<nsIURI> linkURI;
   if (!inNode || !inNode->IsLink(getter_AddRefs(linkURI))) {
     // Not a link
     outURL.Truncate();
     return;
   }
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   linkURI->GetSpec(spec);
   CopyUTF8toUTF16(spec, outURL);
 }
 
 
 //
 // CreateLinkText
 //
@@ -522,17 +522,17 @@ DragDataProducer::Produce(nsDOMDataTrans
       } else if (image) {
         mIsAnchor = true;
         // grab the href as the url, use alt text as the title of the
         // area if it's there.  the drag data is the image tag and src
         // attribute.
         nsCOMPtr<nsIURI> imageURI;
         image->GetCurrentURI(getter_AddRefs(imageURI));
         if (imageURI) {
-          nsCAutoString spec;
+          nsAutoCString spec;
           imageURI->GetSpec(spec);
           CopyUTF8toUTF16(spec, mUrlString);
         }
 
         nsCOMPtr<nsIDOMElement> imageElement(do_QueryInterface(image));
         // XXXbz Shouldn't we use the "title" attr for title?  Using
         // "alt" seems very wrong....
         if (imageElement) {
@@ -556,51 +556,51 @@ DragDataProducer::Produce(nsDOMDataTrans
         // Fix the file extension in the URL if necessary
         if (imgRequest && mimeService) {
           nsCOMPtr<nsIURI> imgUri;
           imgRequest->GetURI(getter_AddRefs(imgUri));
 
           nsCOMPtr<nsIURL> imgUrl(do_QueryInterface(imgUri));
 
           if (imgUrl) {
-            nsCAutoString extension;
+            nsAutoCString extension;
             imgUrl->GetFileExtension(extension);
 
             nsXPIDLCString mimeType;
             imgRequest->GetMimeType(getter_Copies(mimeType));
 
             nsCOMPtr<nsIMIMEInfo> mimeInfo;
             mimeService->GetFromTypeAndExtension(mimeType, EmptyCString(),
                                                  getter_AddRefs(mimeInfo));
 
             if (mimeInfo) {
-              nsCAutoString spec;
+              nsAutoCString spec;
               imgUrl->GetSpec(spec);
 
               // pass out the image source string
               CopyUTF8toUTF16(spec, mImageSourceString);
 
               bool validExtension;
               if (extension.IsEmpty() || 
                   NS_FAILED(mimeInfo->ExtensionExists(extension,
                                                       &validExtension)) ||
                   !validExtension) {
                 // Fix the file extension in the URL
                 nsresult rv = imgUrl->Clone(getter_AddRefs(imgUri));
                 NS_ENSURE_SUCCESS(rv, rv);
 
                 imgUrl = do_QueryInterface(imgUri);
 
-                nsCAutoString primaryExtension;
+                nsAutoCString primaryExtension;
                 mimeInfo->GetPrimaryExtension(primaryExtension);
 
                 imgUrl->SetFileExtension(primaryExtension);
               }
 
-              nsCAutoString fileName;
+              nsAutoCString fileName;
               imgUrl->GetFileName(fileName);
 
               NS_UnescapeURL(fileName);
 
               // make the filename safe for the filesystem
               fileName.ReplaceChar(FILE_PATH_SEPARATOR FILE_ILLEGAL_CHARACTERS,
                                    '-');
 
--- a/content/base/src/nsContentPolicy.cpp
+++ b/content/base/src/nsContentPolicy.cpp
@@ -49,17 +49,17 @@ nsContentPolicy::nsContentPolicy()
 nsContentPolicy::~nsContentPolicy()
 {
 }
 
 #ifdef DEBUG
 #define WARN_IF_URI_UNINITIALIZED(uri,name)                         \
   PR_BEGIN_MACRO                                                    \
     if ((uri)) {                                                    \
-        nsCAutoString spec;                                         \
+        nsAutoCString spec;                                         \
         (uri)->GetAsciiSpec(spec);                                  \
         if (spec.IsEmpty()) {                                       \
             NS_WARNING(name " is uninitialized, fix caller");       \
         }                                                           \
     }                                                               \
   PR_END_MACRO
 
 #else  // ! defined(DEBUG)
@@ -146,21 +146,21 @@ nsContentPolicy::CheckPolicy(CPMethod   
     /* skip all this nonsense if the call failed */                           \
     if (NS_SUCCEEDED(rv)) {                                                   \
       const char *resultName;                                                 \
       if (decision) {                                                         \
         resultName = NS_CP_ResponseName(*decision);                           \
       } else {                                                                \
         resultName = "(null ptr)";                                            \
       }                                                                       \
-      nsCAutoString spec("None");                                             \
+      nsAutoCString spec("None");                                             \
       if (contentLocation) {                                                  \
           contentLocation->GetSpec(spec);                                     \
       }                                                                       \
-      nsCAutoString refSpec("None");                                          \
+      nsAutoCString refSpec("None");                                          \
       if (requestingLocation) {                                               \
           requestingLocation->GetSpec(refSpec);                               \
       }                                                                       \
       PR_LOG(gConPolLog, PR_LOG_DEBUG,                                        \
              ("Content Policy: " logType ": <%s> <Ref:%s> result=%s",         \
               spec.get(), refSpec.get(), resultName)                          \
              );                                                               \
     }                                                                         \
--- a/content/base/src/nsContentSink.cpp
+++ b/content/base/src/nsContentSink.cpp
@@ -251,17 +251,17 @@ nsContentSink::ProcessHTTPHeaders(nsICha
   
   if (!httpchannel) {
     return NS_OK;
   }
 
   // Note that the only header we care about is the "link" header, since we
   // have all the infrastructure for kicking off stylesheet loads.
   
-  nsCAutoString linkHeader;
+  nsAutoCString linkHeader;
   
   nsresult rv = httpchannel->GetResponseHeader(NS_LITERAL_CSTRING("link"),
                                                linkHeader);
   if (NS_SUCCEEDED(rv) && !linkHeader.IsEmpty()) {
     mDocument->SetHeaderData(nsGkAtoms::link,
                              NS_ConvertASCIItoUTF16(linkHeader));
 
     NS_ASSERTION(!mProcessLinkHeaderEvent.get(),
@@ -407,34 +407,34 @@ bool
 nsContentSink::Decode5987Format(nsAString& aEncoded) {
 
   nsresult rv;
   nsCOMPtr<nsIMIMEHeaderParam> mimehdrpar =
   do_GetService(NS_MIMEHEADERPARAM_CONTRACTID, &rv);
   if (NS_FAILED(rv))
     return false;
 
-  nsCAutoString asciiValue;
+  nsAutoCString asciiValue;
 
   const PRUnichar* encstart = aEncoded.BeginReading();
   const PRUnichar* encend = aEncoded.EndReading();
 
   // create a plain ASCII string, aborting if we can't do that
   // converted form is always shorter than input
   while (encstart != encend) {
     if (*encstart > 0 && *encstart < 128) {
       asciiValue.Append((char)*encstart);
     } else {
       return false;
     }
     encstart++;
   }
 
   nsAutoString decoded;
-  nsCAutoString language;
+  nsAutoCString language;
 
   rv = mimehdrpar->DecodeRFC5987Param(asciiValue, language, decoded);
   if (NS_FAILED(rv))
     return false;
 
   aEncoded = decoded;
   return true;
 }
@@ -855,17 +855,17 @@ nsContentSink::PrefetchDNS(const nsAStri
     hostname = Substring(aHref, 2);
   }
   else {
     nsCOMPtr<nsIURI> uri;
     NS_NewURI(getter_AddRefs(uri), aHref);
     if (!uri) {
       return;
     }
-    nsCAutoString host;
+    nsAutoCString host;
     uri->GetHost(host);
     CopyUTF8toUTF16(host, hostname);
   }
 
   if (!hostname.IsEmpty() && nsHTMLDNSPrefetch::IsAllowed(mDocument)) {
     nsHTMLDNSPrefetch::PrefetchLow(hostname);
   }
 }
@@ -881,17 +881,17 @@ nsContentSink::SelectDocAppCache(nsIAppl
   *aAction = CACHE_SELECTION_NONE;
 
   nsCOMPtr<nsIApplicationCacheContainer> applicationCacheDocument =
     do_QueryInterface(mDocument);
   NS_ASSERTION(applicationCacheDocument,
                "mDocument must implement nsIApplicationCacheContainer.");
 
   if (aLoadApplicationCache) {
-    nsCAutoString groupID;
+    nsAutoCString groupID;
     rv = aLoadApplicationCache->GetGroupID(groupID);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIURI> groupURI;
     rv = NS_NewURI(getter_AddRefs(groupURI), groupID);
     NS_ENSURE_SUCCESS(rv, rv);
 
     bool equal = false;
@@ -904,17 +904,17 @@ nsContentSink::SelectDocAppCache(nsIAppl
 
       *aAction = CACHE_SELECTION_RELOAD;
     }
     else {
       // The http manifest attribute URI is equal to the manifest URI of
       // the cache the document was loaded from - associate the document with
       // that cache and invoke the cache update process.
 #ifdef DEBUG
-      nsCAutoString docURISpec, clientID;
+      nsAutoCString docURISpec, clientID;
       mDocumentURI->GetAsciiSpec(docURISpec);
       aLoadApplicationCache->GetClientID(clientID);
       SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_CALLS,
           ("Selection: assigning app cache %s to document %s", clientID.get(), docURISpec.get()));
 #endif
 
       rv = applicationCacheDocument->SetApplicationCache(aLoadApplicationCache);
       NS_ENSURE_SUCCESS(rv, rv);
@@ -958,29 +958,29 @@ nsContentSink::SelectDocAppCacheNoManife
     // The document was loaded from an application cache, use that
     // application cache as the document's application cache.
     nsCOMPtr<nsIApplicationCacheContainer> applicationCacheDocument =
       do_QueryInterface(mDocument);
     NS_ASSERTION(applicationCacheDocument,
                  "mDocument must implement nsIApplicationCacheContainer.");
 
 #ifdef DEBUG
-    nsCAutoString docURISpec, clientID;
+    nsAutoCString docURISpec, clientID;
     mDocumentURI->GetAsciiSpec(docURISpec);
     aLoadApplicationCache->GetClientID(clientID);
     SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_CALLS,
         ("Selection, no manifest: assigning app cache %s to document %s", clientID.get(), docURISpec.get()));
 #endif
 
     rv = applicationCacheDocument->SetApplicationCache(aLoadApplicationCache);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Return the uri and invoke the update process for the selected
     // application cache.
-    nsCAutoString groupID;
+    nsAutoCString groupID;
     rv = aLoadApplicationCache->GetGroupID(groupID);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = NS_NewURI(aManifestURI, groupID);
     NS_ENSURE_SUCCESS(rv, rv);
 
     *aAction = CACHE_SELECTION_UPDATE;
   }
@@ -1077,17 +1077,17 @@ nsContentSink::ProcessOfflineManifest(co
       // Only continue if the document has permission to use offline APIs.
       if (!nsContentUtils::OfflineAppAllowed(mDocument->NodePrincipal())) {
         return;
       }
 
       bool fetchedWithHTTPGetOrEquiv = false;
       nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(mDocument->GetChannel()));
       if (httpChannel) {
-        nsCAutoString method;
+        nsAutoCString method;
         rv = httpChannel->GetRequestMethod(method);
         if (NS_SUCCEEDED(rv))
           fetchedWithHTTPGetOrEquiv = method.Equals("GET");
       }
 
       rv = SelectDocAppCache(applicationCache, manifestURI,
                              fetchedWithHTTPGetOrEquiv, &action);
       if (NS_FAILED(rv)) {
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -660,23 +660,23 @@ nsContentUtils::IsAutocompleteEnabled(ns
 
 bool
 nsContentUtils::URIIsChromeOrInPref(nsIURI *aURI, const char *aPref)
 {
   if (!aURI) {
     return false;
   }
 
-  nsCAutoString scheme;
+  nsAutoCString scheme;
   aURI->GetScheme(scheme);
   if (scheme.EqualsLiteral("chrome")) {
     return true;
   }
 
-  nsCAutoString prePathUTF8;
+  nsAutoCString prePathUTF8;
   aURI->GetPrePath(prePathUTF8);
   NS_ConvertUTF8toUTF16 prePath(prePathUTF8);
 
   const nsAdoptingString& whitelist = Preferences::GetString(aPref);
 
   // This tokenizer also strips off whitespace around tokens, as desired.
   nsCharSeparatedTokenizer tokenizer(whitelist, ',',
     nsCharSeparatedTokenizerTemplate<>::SEPARATOR_OPTIONAL);
@@ -3265,17 +3265,17 @@ nsContentUtils::ReportToConsole(uint32_t
     rv = FormatLocalizedString(aFile, aMessageName, aParams, aParamsLength,
                                errorText);
   }
   else {
     rv = GetLocalizedString(aFile, aMessageName, errorText);
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   if (!aLineNumber) {
     JSContext *cx = nullptr;
     sThreadJSContextStack->Peek(&cx);
     if (cx) {
       const char* filename;
       uint32_t lineno;
       if (nsJSUtils::GetCallingLocation(cx, &filename, &lineno)) {
         spec = filename;
@@ -3354,17 +3354,17 @@ nsContentUtils::GetWrapperSafeScriptFile
 
     if (docURI && docWrappersEnabled && !uriWrappersEnabled) {
       // aURI is a script from a URL that doesn't get wrapper
       // automation. aDocument is a chrome document that does get
       // wrapper automation. Prepend the chrome document's URI
       // followed by the string " -> " to the URI of the script we're
       // loading here so that script in that URI gets the same wrapper
       // automation that the chrome document expects.
-      nsCAutoString spec;
+      nsAutoCString spec;
       docURI->GetSpec(spec);
       spec.AppendASCII(" -> ");
       spec.Append(aScriptURI);
 
       aScriptURI = spec;
 
       scriptFileNameModified = true;
     }
@@ -3696,17 +3696,17 @@ nsContentUtils::GuessCharset(const char 
   nsCOMPtr<nsICharsetDetector> detector =
     do_CreateInstance(NS_CHARSET_DETECTOR_CONTRACTID_BASE
                       "universal_charset_detector");
   if (!detector) {
     // No universal charset detector, try the default charset detector
     const nsAdoptingCString& detectorName =
       Preferences::GetLocalizedCString("intl.charset.detector");
     if (!detectorName.IsEmpty()) {
-      nsCAutoString detectorContractID;
+      nsAutoCString detectorContractID;
       detectorContractID.AssignLiteral(NS_CHARSET_DETECTOR_CONTRACTID_BASE);
       detectorContractID += detectorName;
       detector = do_CreateInstance(detectorContractID.get());
     }
   }
 
   nsresult rv;
 
@@ -4732,17 +4732,17 @@ nsContentUtils::TriggerLink(nsIContent *
 }
 
 /* static */
 void
 nsContentUtils::GetLinkLocation(Element* aElement, nsString& aLocationString)
 {
   nsCOMPtr<nsIURI> hrefURI = aElement->GetHrefURI();
   if (hrefURI) {
-    nsCAutoString specUTF8;
+    nsAutoCString specUTF8;
     nsresult rv = hrefURI->GetSpec(specUTF8);
     if (NS_SUCCEEDED(rv))
       CopyUTF8toUTF16(specUTF8, aLocationString);
   }
 }
 
 /* static */
 nsIWidget*
@@ -5523,17 +5523,17 @@ nsContentUtils::SplitURIAtHash(nsIURI *a
 {
   // See bug 225910 for why we can't do this using nsIURL.
 
   aBeforeHash.Truncate();
   aAfterHash.Truncate();
 
   NS_ENSURE_ARG_POINTER(aURI);
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   nsresult rv = aURI->GetSpec(spec);
   NS_ENSURE_SUCCESS(rv, rv);
 
   int32_t index = spec.FindChar('#');
   if (index == -1) {
     index = spec.Length();
   }
 
--- a/content/base/src/nsCopySupport.cpp
+++ b/content/base/src/nsCopySupport.cpp
@@ -215,17 +215,17 @@ SelectionCopyHelper(nsISelection *aSel, 
           // the kURLMime flavour which is not desirable (eg. when pasting into Notepad)
           rv = AppendString(trans, plaintextBuffer, kUnicodeMime);
           NS_ENSURE_SUCCESS(rv, rv);
         }
 
         // Try and get source URI of the items that are being dragged
         nsIURI *uri = aDoc->GetDocumentURI();
         if (uri) {
-          nsCAutoString spec;
+          nsAutoCString spec;
           uri->GetSpec(spec);
           if (!spec.IsEmpty()) {
             nsAutoString shortcut;
             AppendUTF8toUTF16(spec, shortcut);
 
             // Add the URL DataFlavor to the transferable. Don't use kURLMime, as it will
             // cause an unnecessary UniformResourceLocator to be added which confuses
             // some apps eg. Outlook 2000 - (See Bug 315370). Don't use
@@ -423,17 +423,17 @@ nsresult nsCopySupport::IsPlainTextConte
 
 nsresult
 nsCopySupport::GetContents(const nsACString& aMimeType, uint32_t aFlags, nsISelection *aSel, nsIDocument *aDoc, nsAString& outdata)
 {
   nsresult rv = NS_OK;
   
   nsCOMPtr<nsIDocumentEncoder> docEncoder;
 
-  nsCAutoString encoderContractID(NS_DOC_ENCODER_CONTRACTID_BASE);
+  nsAutoCString encoderContractID(NS_DOC_ENCODER_CONTRACTID_BASE);
   encoderContractID.Append(aMimeType);
     
   docEncoder = do_CreateInstance(encoderContractID.get());
   NS_ENSURE_TRUE(docEncoder, NS_ERROR_FAILURE);
 
   uint32_t flags = aFlags | nsIDocumentEncoder::SkipInvisibleContent;
   
   if (aMimeType.Equals("text/plain"))
@@ -472,17 +472,17 @@ nsCopySupport::ImageCopy(nsIImageLoading
 
   if (aCopyFlags & nsIContentViewerEdit::COPY_IMAGE_TEXT) {
     // get the location from the element
     nsCOMPtr<nsIURI> uri;
     rv = aImageElement->GetCurrentURI(getter_AddRefs(uri));
     NS_ENSURE_SUCCESS(rv, rv);
     NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE);
 
-    nsCAutoString location;
+    nsAutoCString location;
     rv = uri->GetSpec(location);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // append the string to the transferable
     rv = AppendString(trans, NS_ConvertUTF8toUTF16(location), kUnicodeMime);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
--- a/content/base/src/nsCrossSiteListenerProxy.cpp
+++ b/content/base/src/nsCrossSiteListenerProxy.cpp
@@ -289,32 +289,32 @@ nsPreflightCache::GetCacheKey(nsIURI* aU
   NS_ASSERTION(aPrincipal, "Null principal!");
   
   NS_NAMED_LITERAL_CSTRING(space, " ");
 
   nsCOMPtr<nsIURI> uri;
   nsresult rv = aPrincipal->GetURI(getter_AddRefs(uri));
   NS_ENSURE_SUCCESS(rv, false);
   
-  nsCAutoString scheme, host, port;
+  nsAutoCString scheme, host, port;
   if (uri) {
     uri->GetScheme(scheme);
     uri->GetHost(host);
     port.AppendInt(NS_GetRealPort(uri));
   }
 
-  nsCAutoString cred;
+  nsAutoCString cred;
   if (aWithCredentials) {
     _retval.AssignLiteral("cred");
   }
   else {
     _retval.AssignLiteral("nocred");
   }
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   rv = aURI->GetSpec(spec);
   NS_ENSURE_SUCCESS(rv, false);
 
   _retval.Assign(cred + space + scheme + space + host + space + port + space +
                  spec);
 
   return true;
 }
@@ -507,34 +507,34 @@ nsCORSListenerProxy::CheckRequestApprove
   NS_ENSURE_SUCCESS(rv, rv);
   NS_ENSURE_SUCCESS(status, status);
 
   // Test that things worked on a HTTP level
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(aRequest);
   NS_ENSURE_TRUE(http, NS_ERROR_DOM_BAD_URI);
 
   // Check the Access-Control-Allow-Origin header
-  nsCAutoString allowedOriginHeader;
+  nsAutoCString allowedOriginHeader;
   rv = http->GetResponseHeader(
     NS_LITERAL_CSTRING("Access-Control-Allow-Origin"), allowedOriginHeader);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (mWithCredentials || !allowedOriginHeader.EqualsLiteral("*")) {
-    nsCAutoString origin;
+    nsAutoCString origin;
     rv = nsContentUtils::GetASCIIOrigin(mRequestingPrincipal, origin);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!allowedOriginHeader.Equals(origin)) {
       return NS_ERROR_DOM_BAD_URI;
     }
   }
 
   // Check Access-Control-Allow-Credentials header
   if (mWithCredentials) {
-    nsCAutoString allowCredentialsHeader;
+    nsAutoCString allowCredentialsHeader;
     rv = http->GetResponseHeader(
       NS_LITERAL_CSTRING("Access-Control-Allow-Credentials"), allowCredentialsHeader);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!allowCredentialsHeader.EqualsLiteral("true")) {
       return NS_ERROR_DOM_BAD_URI;
     }
   }
@@ -542,17 +542,17 @@ nsCORSListenerProxy::CheckRequestApprove
   if (mIsPreflight) {
     bool succeeded;
     rv = http->GetRequestSucceeded(&succeeded);
     NS_ENSURE_SUCCESS(rv, rv);
     if (!succeeded) {
       return NS_ERROR_DOM_BAD_URI;
     }
 
-    nsCAutoString headerVal;
+    nsAutoCString headerVal;
     // The "Access-Control-Allow-Methods" header contains a comma separated
     // list of method names.
     http->GetResponseHeader(NS_LITERAL_CSTRING("Access-Control-Allow-Methods"),
                             headerVal);
     bool foundMethod = mPreflightMethod.EqualsLiteral("GET") ||
                          mPreflightMethod.EqualsLiteral("HEAD") ||
                          mPreflightMethod.EqualsLiteral("POST");
     nsCCharSeparatedTokenizer methodTokens(headerVal, ',');
@@ -753,17 +753,17 @@ nsCORSListenerProxy::UpdateChannel(nsICh
   // It's a cross site load
   mHasBeenCrossSite = true;
 
   nsCString userpass;
   uri->GetUserPass(userpass);
   NS_ENSURE_TRUE(userpass.IsEmpty(), NS_ERROR_DOM_BAD_URI);
 
   // Add the Origin header
-  nsCAutoString origin;
+  nsAutoCString origin;
   rv = nsContentUtils::GetASCIIOrigin(mRequestingPrincipal, origin);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(aChannel);
   NS_ENSURE_TRUE(http, NS_ERROR_FAILURE);
 
   rv = http->SetRequestHeader(NS_LITERAL_CSTRING("Origin"), origin, false);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -771,17 +771,17 @@ nsCORSListenerProxy::UpdateChannel(nsICh
   // Add preflight headers if this is a preflight request
   if (mIsPreflight) {
     rv = http->
       SetRequestHeader(NS_LITERAL_CSTRING("Access-Control-Request-Method"),
                        mPreflightMethod, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!mPreflightHeaders.IsEmpty()) {
-      nsCAutoString headers;
+      nsAutoCString headers;
       for (uint32_t i = 0; i < mPreflightHeaders.Length(); ++i) {
         if (i != 0) {
           headers += ',';
         }
         headers += mPreflightHeaders[i];
       }
       rv = http->
         SetRequestHeader(NS_LITERAL_CSTRING("Access-Control-Request-Headers"),
@@ -848,17 +848,17 @@ NS_IMPL_ISUPPORTS4(nsCORSPreflightListen
 
 void
 nsCORSPreflightListener::AddResultToCache(nsIRequest *aRequest)
 {
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(aRequest);
   NS_ASSERTION(http, "Request was not http");
 
   // The "Access-Control-Max-Age" header should return an age in seconds.
-  nsCAutoString headerVal;
+  nsAutoCString headerVal;
   http->GetResponseHeader(NS_LITERAL_CSTRING("Access-Control-Max-Age"),
                           headerVal);
   if (headerVal.IsEmpty()) {
     return;
   }
 
   // Sanitize the string. We only allow 'delta-seconds' as specified by
   // http://dev.w3.org/2006/waf/access-control (digits 0-9 with no leading or
@@ -1039,17 +1039,17 @@ NS_StartCORSPreflight(nsIChannel* aReque
                       nsIStreamListener* aListener,
                       nsIPrincipal* aPrincipal,
                       bool aWithCredentials,
                       nsTArray<nsCString>& aUnsafeHeaders,
                       nsIChannel** aPreflightChannel)
 {
   *aPreflightChannel = nullptr;
 
-  nsCAutoString method;
+  nsAutoCString method;
   nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(aRequestChannel));
   NS_ENSURE_TRUE(httpChannel, NS_ERROR_UNEXPECTED);
   httpChannel->GetRequestMethod(method);
 
   nsCOMPtr<nsIURI> uri;
   nsresult rv = NS_GetFinalChannelURI(aRequestChannel, getter_AddRefs(uri));
   NS_ENSURE_SUCCESS(rv, rv);
 
--- a/content/base/src/nsDOMFile.cpp
+++ b/content/base/src/nsDOMFile.cpp
@@ -535,17 +535,17 @@ nsDOMFileFile::GetType(nsAString &aType)
   if (mContentType.IsVoid()) {
     NS_ASSERTION(mWholeFile,
                  "Should only use lazy ContentType when using the whole file");
     nsresult rv;
     nsCOMPtr<nsIMIMEService> mimeService =
       do_GetService(NS_MIMESERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsCAutoString mimeType;
+    nsAutoCString mimeType;
     rv = mimeService->GetTypeFromFile(mFile, mimeType);
     if (NS_FAILED(rv)) {
       mimeType.Truncate();
     }
 
     AppendUTF8toUTF16(mimeType, mContentType);
     mContentType.SetIsVoid(false);
   }
@@ -708,13 +708,13 @@ nsDOMFileInternalUrlHolder::nsDOMFileInt
                                                        nsIPrincipal* aPrincipal
                                                        MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) {
   MOZ_GUARD_OBJECT_NOTIFIER_INIT;
   aFile->GetInternalUrl(aPrincipal, mUrl);
 }
  
 nsDOMFileInternalUrlHolder::~nsDOMFileInternalUrlHolder() {
   if (!mUrl.IsEmpty()) {
-    nsCAutoString narrowUrl;
+    nsAutoCString narrowUrl;
     CopyUTF16toUTF8(mUrl, narrowUrl);
     nsBlobProtocolHandler::RemoveFileDataEntry(narrowUrl);
   }
 }
--- a/content/base/src/nsDOMFileReader.cpp
+++ b/content/base/src/nsDOMFileReader.cpp
@@ -432,25 +432,25 @@ nsDOMFileReader::ReadFileContent(JSConte
 
 nsresult
 nsDOMFileReader::GetAsText(const nsACString &aCharset,
                            const char *aFileData,
                            uint32_t aDataLen,
                            nsAString& aResult)
 {
   nsresult rv;
-  nsCAutoString charsetGuess;
+  nsAutoCString charsetGuess;
   if (!aCharset.IsEmpty()) {
     charsetGuess = aCharset;
   } else {
     rv = nsContentUtils::GuessCharset(aFileData, aDataLen, charsetGuess);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  nsCAutoString charset;
+  nsAutoCString charset;
   rv = nsCharsetAlias::GetPreferred(charsetGuess, charset);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = ConvertStream(aFileData, aDataLen, charset.get(), aResult);
 
   return NS_OK;
 }
 
--- a/content/base/src/nsDOMSerializer.cpp
+++ b/content/base/src/nsDOMSerializer.cpp
@@ -61,17 +61,17 @@ SetUpEncoder(nsIDOMNode *aRoot, const ns
   // This method will fail if no document
   rv = encoder->Init(domDoc, NS_LITERAL_STRING("application/xhtml+xml"),
                      nsIDocumentEncoder::OutputRaw |
                      nsIDocumentEncoder::OutputDontRewriteEncodingDeclaration);
 
   if (NS_FAILED(rv))
     return rv;
 
-  nsCAutoString charset(aCharset);
+  nsAutoCString charset(aCharset);
   if (charset.IsEmpty()) {
     nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
     NS_ASSERTION(doc, "Need a document");
     charset = doc->GetDocumentCharacterSet();
   }
   rv = encoder->SetCharset(charset);
   if (NS_FAILED(rv))
     return rv;
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -955,17 +955,17 @@ nsExternalResourceMap::PendingLoad::Setu
     bool requestSucceeded;
     if (NS_FAILED(httpChannel->GetRequestSucceeded(&requestSucceeded)) ||
         !requestSucceeded) {
       // Bail out on this load, since it looks like we have an HTTP error page
       return NS_BINDING_ABORTED;
     }
   }
  
-  nsCAutoString type;
+  nsAutoCString type;
   chan->GetContentType(type);
 
   nsCOMPtr<nsILoadGroup> loadGroup;
   chan->GetLoadGroup(getter_AddRefs(loadGroup));
 
   // Give this document its own loadgroup
   nsCOMPtr<nsILoadGroup> newLoadGroup =
         do_CreateInstance(NS_LOADGROUP_CONTRACTID);
@@ -1796,24 +1796,24 @@ static const char* kNSURIs[] = {
   "(MathML)",
   "(RDF)",
   "(XUL)"
 };
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDocument)
   if (NS_UNLIKELY(cb.WantDebugInfo())) {
     char name[512];
-    nsCAutoString loadedAsData;
+    nsAutoCString loadedAsData;
     if (tmp->IsLoadedAsData()) {
       loadedAsData.AssignLiteral("data");
     } else {
       loadedAsData.AssignLiteral("normal");
     }
     uint32_t nsid = tmp->GetDefaultNamespaceID();
-    nsCAutoString uri;
+    nsAutoCString uri;
     if (tmp->mDocumentURI)
       tmp->mDocumentURI->GetSpec(uri);
     if (nsid < ArrayLength(kNSURIs)) {
       PR_snprintf(name, sizeof(name), "nsDocument %s %s %s",
                   loadedAsData.get(), kNSURIs[nsid], uri.get());
     }
     else {
       PR_snprintf(name, sizeof(name), "nsDocument %s %s",
@@ -2093,17 +2093,17 @@ nsDocument::Reset(nsIChannel* aChannel, 
 void
 nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
                        nsIPrincipal* aPrincipal)
 {
   NS_PRECONDITION(aURI, "Null URI passed to ResetToURI");
 
 #ifdef PR_LOGGING
   if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
-    nsCAutoString spec;
+    nsAutoCString spec;
     aURI->GetSpec(spec);
     PR_LogPrint("DOCUMENT %p ResetToURI %s", this, spec.get());
   }
 #endif
 
   mSecurityInfo = nullptr;
 
   mDocumentLoadGroup = nullptr;
@@ -2348,17 +2348,17 @@ nsDocument::StartDocumentLoad(const char
                               nsISupports* aContainer,
                               nsIStreamListener **aDocListener,
                               bool aReset, nsIContentSink* aSink)
 {
 #ifdef PR_LOGGING
   if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
     nsCOMPtr<nsIURI> uri;
     aChannel->GetURI(getter_AddRefs(uri));
-    nsCAutoString spec;
+    nsAutoCString spec;
     if (uri)
       uri->GetSpec(spec);
     PR_LogPrint("DOCUMENT %p StartDocumentLoad %s", this, spec.get());
   }
 #endif
 
   MOZ_ASSERT(GetReadyStateEnum() == nsIDocument::READYSTATE_UNINITIALIZED,
              "Bad readyState");
@@ -2383,17 +2383,17 @@ nsDocument::StartDocumentLoad(const char
   mMayStartLayout = false;
 
   mHaveInputEncoding = true;
 
   if (aReset) {
     Reset(aChannel, aLoadGroup);
   }
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   if (NS_SUCCEEDED(aChannel->GetContentType(contentType))) {
     // XXX this is only necessary for viewsource:
     nsACString::const_iterator start, end, semicolon;
     contentType.BeginReading(start);
     contentType.EndReading(end);
     semicolon = start;
     FindCharInReadable(';', semicolon, end);
     SetContentTypeInternal(Substring(start, semicolon));
@@ -3001,17 +3001,17 @@ nsDocument::GetBaseTarget(nsAString &aBa
 
 void
 nsDocument::SetDocumentCharacterSet(const nsACString& aCharSetID)
 {
   if (!mCharacterSet.Equals(aCharSetID)) {
     mCharacterSet = aCharSetID;
 
 #ifdef DEBUG
-    nsCAutoString canonicalName;
+    nsAutoCString canonicalName;
     nsCharsetAlias::GetPreferred(aCharSetID, canonicalName);
     NS_ASSERTION(canonicalName.Equals(aCharSetID),
                  "charset name must be canonical");
 #endif
 
     int32_t n = mCharSetObservers.Length();
 
     for (int32_t i = 0; i < n; i++) {
@@ -3140,20 +3140,20 @@ nsDocument::TryChannelCharset(nsIChannel
                               nsACString& aCharset,
                               nsHtml5TreeOpExecutor* aExecutor)
 {
   if(kCharsetFromChannel <= aCharsetSource) {
     return true;
   }
 
   if (aChannel) {
-    nsCAutoString charsetVal;
+    nsAutoCString charsetVal;
     nsresult rv = aChannel->GetContentCharset(charsetVal);
     if (NS_SUCCEEDED(rv)) {
-      nsCAutoString preferred;
+      nsAutoCString preferred;
       rv = nsCharsetAlias::GetPreferred(charsetVal, preferred);
       if(NS_SUCCEEDED(rv)) {
         aCharset = preferred;
         aCharsetSource = kCharsetFromChannel;
         return true;
       } else if (aExecutor && !charsetVal.IsEmpty()) {
         aExecutor->ComplainAboutBogusProtocolCharset(this);
       }
@@ -3687,17 +3687,17 @@ nsDocument::EnsureCatalogStyleSheet(cons
 {
   mozilla::css::Loader* cssLoader = CSSLoader();
   if (cssLoader->GetEnabled()) {
     int32_t sheetCount = GetNumberOfCatalogStyleSheets();
     for (int32_t i = 0; i < sheetCount; i++) {
       nsIStyleSheet* sheet = GetCatalogStyleSheetAt(i);
       NS_ASSERTION(sheet, "unexpected null stylesheet in the document");
       if (sheet) {
-        nsCAutoString uriStr;
+        nsAutoCString uriStr;
         sheet->GetSheetURI()->GetSpec(uriStr);
         if (uriStr.Equals(aStyleSheetURI))
           return;
       }
     }
 
     nsCOMPtr<nsIURI> uri;
     NS_NewURI(getter_AddRefs(uri), aStyleSheetURI);
@@ -5319,17 +5319,17 @@ nsDocument::GetBoxObjectFor(nsIDOMElemen
       NS_ADDREF(*aResult);
       return NS_OK;
     }
   }
 
   int32_t namespaceID;
   nsCOMPtr<nsIAtom> tag = BindingManager()->ResolveTag(content, &namespaceID);
 
-  nsCAutoString contractID("@mozilla.org/layout/xul-boxobject");
+  nsAutoCString contractID("@mozilla.org/layout/xul-boxobject");
   if (namespaceID == kNameSpaceID_XUL) {
     if (tag == nsGkAtoms::browser ||
         tag == nsGkAtoms::editor ||
         tag == nsGkAtoms::iframe)
       contractID += "-container";
     else if (tag == nsGkAtoms::menu)
       contractID += "-menu";
     else if (tag == nsGkAtoms::popup ||
@@ -5908,17 +5908,17 @@ nsDocument::GetMozSyntheticDocument(bool
   *aSyntheticDocument = mIsSyntheticDocument;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetDocumentURI(nsAString& aDocumentURI)
 {
   if (mDocumentURI) {
-    nsCAutoString uri;
+    nsAutoCString uri;
     mDocumentURI->GetSpec(uri);
     CopyUTF8toUTF16(uri, aDocumentURI);
   } else {
     SetDOMStringToNull(aDocumentURI);
   }
 
   return NS_OK;
 }
@@ -6658,17 +6658,17 @@ nsDocument::SetValueMissingState(const n
 void
 nsDocument::RetrieveRelevantHeaders(nsIChannel *aChannel)
 {
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   PRTime modDate = LL_ZERO;
   nsresult rv;
 
   if (httpChannel) {
-    nsCAutoString tmp;
+    nsAutoCString tmp;
     rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("last-modified"),
                                         tmp);
 
     if (NS_SUCCEEDED(rv)) {
       PRTime time;
       PRStatus st = PR_ParseTimeString(tmp.get(), true, &time);
       if (st == PR_SUCCESS) {
         modDate = time;
@@ -6693,17 +6693,17 @@ nsDocument::RetrieveRelevantHeaders(nsIC
       "x-content-security-policy-report-only",
       "x-frame-options",
       // add more http headers if you need
       // XXXbz don't add content-location support without reading bug
       // 238654 and its dependencies/dups first.
       0
     };
     
-    nsCAutoString headerVal;
+    nsAutoCString headerVal;
     const char *const *name = headers;
     while (*name) {
       rv =
         httpChannel->GetResponseHeader(nsDependentCString(*name), headerVal);
       if (NS_SUCCEEDED(rv) && !headerVal.IsEmpty()) {
         nsCOMPtr<nsIAtom> key = do_GetAtom(*name);
         SetHeaderData(key, NS_ConvertASCIItoUTF16(headerVal));
       }
@@ -6720,17 +6720,17 @@ nsDocument::RetrieveRelevantHeaders(nsIC
 
         if (NS_SUCCEEDED(rv)) {
           int64_t intermediateValue;
           LL_I2L(intermediateValue, PR_USEC_PER_MSEC);
           LL_MUL(modDate, msecs, intermediateValue);
         }
       }
     } else {
-      nsCAutoString contentDisp;
+      nsAutoCString contentDisp;
       rv = aChannel->GetContentDispositionHeader(contentDisp);
       if (NS_SUCCEEDED(rv)) {
         SetHeaderData(nsGkAtoms::headerContentDisposition,
                       NS_ConvertASCIItoUTF16(contentDisp));
       }
     }
   }
 
@@ -6964,17 +6964,17 @@ nsDocument::CanSavePresentation(nsIReque
 
     while (NS_SUCCEEDED(requests->HasMoreElements(&hasMore)) && hasMore) {
       nsCOMPtr<nsISupports> elem;
       requests->GetNext(getter_AddRefs(elem));
 
       nsCOMPtr<nsIRequest> request = do_QueryInterface(elem);
       if (request && request != aNewRequest && request != baseChannel) {
 #ifdef DEBUG_PAGE_CACHE
-        nsCAutoString requestName, docSpec;
+        nsAutoCString requestName, docSpec;
         request->GetName(requestName);
         if (mDocumentURI)
           mDocumentURI->GetSpec(docSpec);
 
         printf("document %s has request %s\n",
                docSpec.get(), requestName.get());
 #endif
         return false;
@@ -7848,17 +7848,17 @@ nsDocument::UnregisterFileDataUri(const 
 
 void
 nsDocument::SetScrollToRef(nsIURI *aDocumentURI)
 {
   if (!aDocumentURI) {
     return;
   }
 
-  nsCAutoString ref;
+  nsAutoCString ref;
 
   // Since all URI's that pass through here aren't URL's we can't
   // rely on the nsIURI implementation for providing a way for
   // finding the 'ref' part of the URI, we'll haveto revert to
   // string routines for finding the data past '#'
 
   aDocumentURI->GetSpec(ref);
 
@@ -7886,17 +7886,17 @@ nsDocument::ScrollToRef()
   }
 
   char* tmpstr = ToNewCString(mScrollToRef);
   if (!tmpstr) {
     return;
   }
 
   nsUnescape(tmpstr);
-  nsCAutoString unescapedRef;
+  nsAutoCString unescapedRef;
   unescapedRef.Assign(tmpstr);
   nsMemory::Free(tmpstr);
 
   nsresult rv = NS_ERROR_FAILURE;
   // We assume that the bytes are in UTF-8, as it says in the spec:
   // http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.1
   NS_ConvertUTF8toUTF16 ref(unescapedRef);
 
--- a/content/base/src/nsDocumentEncoder.cpp
+++ b/content/base/src/nsDocumentEncoder.cpp
@@ -562,17 +562,17 @@ ConvertAndWrite(const nsAString& aString
   const PRUnichar* unicodeBuf = flat.get();
   int32_t unicodeLength = aString.Length();
   int32_t startLength = unicodeLength;
 
   rv = aEncoder->GetMaxLength(unicodeBuf, unicodeLength, &charLength);
   startCharLength = charLength;
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCAutoString charXferString;
+  nsAutoCString charXferString;
   if (!EnsureStringLength(charXferString, charLength))
     return NS_ERROR_OUT_OF_MEMORY;
 
   char* charXferBuf = charXferString.BeginWriting();
   nsresult convert_rv = NS_OK;
 
   do {
     unicodeLength = startLength;
@@ -603,28 +603,28 @@ ConvertAndWrite(const nsAString& aString
       // Make sure finish_buf is null-terminated before we call
       // Write().
 
       finish_buf[charLength] = '\0';
 
       rv = aStream->Write(finish_buf, charLength, &written);
       NS_ENSURE_SUCCESS(rv, rv);
 
-      nsCAutoString entString("&#");
+      nsAutoCString entString("&#");
       if (NS_IS_HIGH_SURROGATE(unicodeBuf[unicodeLength - 1]) && 
           unicodeLength < startLength && NS_IS_LOW_SURROGATE(unicodeBuf[unicodeLength]))  {
         entString.AppendInt(SURROGATE_TO_UCS4(unicodeBuf[unicodeLength - 1],
                                               unicodeBuf[unicodeLength]));
         unicodeLength += 1;
       }
       else
         entString.AppendInt(unicodeBuf[unicodeLength - 1]);
       entString.Append(';');
 
-      // Since entString is an nsCAutoString we know entString.get()
+      // Since entString is an nsAutoCString we know entString.get()
       // returns a null-terminated string, so no need for extra
       // null-termination before calling Write() here.
 
       rv = aStream->Write(entString.get(), entString.Length(), &written);
       NS_ENSURE_SUCCESS(rv, rv);
 
       unicodeBuf += unicodeLength;
       startLength -= unicodeLength;
@@ -1033,17 +1033,17 @@ nsDocumentEncoder::EncodeToString(nsAStr
                "DocumentEncoder shouldn't keep reference to non-readonly buffer!");
   static_cast<PRUnichar*>(mCachedBuffer->Data())[0] = PRUnichar(0);
   mCachedBuffer->ToString(0, output, true);
   // output owns the buffer now!
   mCachedBuffer = nullptr;
   
 
   if (!mSerializer) {
-    nsCAutoString progId(NS_CONTENTSERIALIZER_CONTRACTID_PREFIX);
+    nsAutoCString progId(NS_CONTENTSERIALIZER_CONTRACTID_PREFIX);
     AppendUTF16toUTF8(mMimeType, progId);
 
     mSerializer = do_CreateInstance(progId.get());
     NS_ENSURE_TRUE(mSerializer, NS_ERROR_NOT_IMPLEMENTED);
   }
 
   nsresult rv = NS_OK;
 
--- a/content/base/src/nsEventSource.cpp
+++ b/content/base/src/nsEventSource.cpp
@@ -278,17 +278,17 @@ nsEventSource::Init(nsIPrincipal* aPrinc
   NS_ENSURE_SUCCESS(rv, rv);
   rv = os->AddObserver(this, DOM_WINDOW_THAWED_TOPIC, true);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString origin;
   rv = nsContentUtils::GetUTFOrigin(srcURI, origin);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   rv = srcURI->GetSpec(spec);
   NS_ENSURE_SUCCESS(rv, rv);
 
   mOriginalURL = NS_ConvertUTF8toUTF16(spec);
   mSrc = srcURI;
   mOrigin = origin;
 
   mReconnectionTime =
@@ -437,17 +437,17 @@ nsEventSource::OnStartRequest(nsIRequest
 
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool requestSucceeded;
   rv = httpChannel->GetRequestSucceeded(&requestSucceeded);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   rv = httpChannel->GetContentType(contentType);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!requestSucceeded || !contentType.EqualsLiteral(TEXT_EVENT_STREAM)) {
     DispatchFailConnection();
     return NS_ERROR_NOT_AVAILABLE;
   }
 
@@ -1106,17 +1106,17 @@ nsEventSource::PrintErrorOnConsole(const
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 nsresult
 nsEventSource::ConsoleError()
 {
-  nsCAutoString targetSpec;
+  nsAutoCString targetSpec;
   nsresult rv = mSrc->GetSpec(targetSpec);
   NS_ENSURE_SUCCESS(rv, rv);
 
   NS_ConvertUTF8toUTF16 specUTF16(targetSpec);
   const PRUnichar *formatStrings[] = { specUTF16.get() };
 
   if (mReadyState == nsIEventSource::CONNECTING) {
     rv = PrintErrorOnConsole("chrome://global/locale/appstrings.properties",
@@ -1229,17 +1229,17 @@ nsEventSource::CheckCanRequestSrc(nsIURI
                                  doc,
                                  NS_LITERAL_CSTRING(TEXT_EVENT_STREAM),
                                  nullptr,    // extra
                                  &shouldLoad,
                                  nsContentUtils::GetContentPolicy(),
                                  nsContentUtils::GetSecurityManager());
   isValidContentLoadPolicy = NS_SUCCEEDED(rv) && NS_CP_ACCEPTED(shouldLoad);
 
-  nsCAutoString targetURIScheme;
+  nsAutoCString targetURIScheme;
   rv = srcToTest->GetScheme(targetURIScheme);
   if (NS_SUCCEEDED(rv)) {
     // We only have the http support for now
     isValidProtocol = targetURIScheme.EqualsLiteral("http") ||
                       targetURIScheme.EqualsLiteral("https");
   }
 
   return isValidURI && isValidContentLoadPolicy && isValidProtocol;
--- a/content/base/src/nsFrameMessageManager.cpp
+++ b/content/base/src/nsFrameMessageManager.cpp
@@ -711,17 +711,17 @@ ContentScriptErrorReporter(JSContext* aC
       do_GetService(NS_CONSOLESERVICE_CONTRACTID);
   if (consoleService) {
     (void) consoleService->LogMessage(scriptError);
   }
 
 #ifdef DEBUG
   // Print it to stderr as well, for the benefit of those invoking
   // mozilla with -console.
-  nsCAutoString error;
+  nsAutoCString error;
   error.Assign("JavaScript ");
   if (JSREPORT_IS_STRICT(flags)) {
     error.Append("strict ");
   }
   if (JSREPORT_IS_WARNING(flags)) {
     error.Append("warning: ");
   } else {
     error.Append("error: ");
@@ -902,17 +902,17 @@ nsFrameScriptExecutor::TryCacheLoadAndCo
         options.setNoScriptRval(true)
                .setFileAndLine(url.get(), 1)
                .setPrincipals(nsJSPrincipals::get(mPrincipal));
         JS::RootedObject empty(mCx, NULL);
         JSScript* script = JS::Compile(mCx, empty, options,
                                        dataString.get(), dataString.Length());
 
         if (script) {
-          nsCAutoString scheme;
+          nsAutoCString scheme;
           uri->GetScheme(scheme);
           // We don't cache data: scripts!
           if (!scheme.EqualsLiteral("data")) {
             nsFrameJSScriptExecutorHolder* holder =
               new nsFrameJSScriptExecutorHolder(script);
             // Root the object also for caching.
             JS_AddNamedScriptRoot(mCx, &(holder->mScript),
                                   "Cached message manager script");
--- a/content/base/src/nsHTMLContentSerializer.cpp
+++ b/content/base/src/nsHTMLContentSerializer.cpp
@@ -501,17 +501,17 @@ nsHTMLContentSerializer::AppendAndTransl
     nsReadingIterator<PRUnichar> done_reading;
     aStr.EndReading(done_reading);
 
     // for each chunk of |aString|...
     uint32_t advanceLength = 0;
     nsReadingIterator<PRUnichar> iter;
 
     const char **entityTable = mInAttribute ? kAttrEntities : kEntities;
-    nsCAutoString entityReplacement;
+    nsAutoCString entityReplacement;
 
     for (aStr.BeginReading(iter);
          iter != done_reading;
          iter.advance(int32_t(advanceLength))) {
       uint32_t fragmentLength = iter.size_forward();
       uint32_t lengthReplaced = 0; // the number of UTF-16 codepoints
                                     //  replaced by a particular entity
       const PRUnichar* c = iter.get();
--- a/content/base/src/nsINode.cpp
+++ b/content/base/src/nsINode.cpp
@@ -579,17 +579,17 @@ nsINode::Normalize()
   return NS_OK;
 }
 
 nsresult
 nsINode::GetDOMBaseURI(nsAString &aURI) const
 {
   nsCOMPtr<nsIURI> baseURI = GetBaseURI();
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   if (baseURI) {
     baseURI->GetSpec(spec);
   }
 
   CopyUTF8toUTF16(spec, aURI);
 
   return NS_OK;
 }
--- a/content/base/src/nsImageLoadingContent.cpp
+++ b/content/base/src/nsImageLoadingContent.cpp
@@ -59,17 +59,17 @@ static void PrintReqURL(imgIRequest* req
 
   nsCOMPtr<nsIURI> uri;
   req->GetURI(getter_AddRefs(uri));
   if (!uri) {
     printf("(null uri)\n");
     return;
   }
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   uri->GetSpec(spec);
   printf("spec='%s'\n", spec.get());
 }
 #endif /* DEBUG_chb */
 
 
 nsImageLoadingContent::nsImageLoadingContent()
   : mCurrentRequestFlags(0),
--- a/content/base/src/nsNoDataProtocolContentPolicy.cpp
+++ b/content/base/src/nsNoDataProtocolContentPolicy.cpp
@@ -37,17 +37,17 @@ nsNoDataProtocolContentPolicy::ShouldLoa
   // concern ourselves with them.
   if (aContentType != TYPE_DOCUMENT &&
       aContentType != TYPE_SUBDOCUMENT &&
       aContentType != TYPE_OBJECT &&
       aContentType != TYPE_WEBSOCKET) {
 
     // The following are just quick-escapes for the most common cases
     // where we would allow the content to be loaded anyway.
-    nsCAutoString scheme;
+    nsAutoCString scheme;
     aContentLocation->GetScheme(scheme);
     if (scheme.EqualsLiteral("http") ||
         scheme.EqualsLiteral("https") ||
         scheme.EqualsLiteral("ftp") ||
         scheme.EqualsLiteral("file") ||
         scheme.EqualsLiteral("chrome")) {
       return NS_OK;
     }
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -439,17 +439,17 @@ IsSuccessfulRequest(nsIRequest* aRequest
 
   // Otherwise, the request is successful
   return true;
 }
 
 static bool
 CanHandleURI(nsIURI* aURI)
 {
-  nsCAutoString scheme;
+  nsAutoCString scheme;
   if (NS_FAILED(aURI->GetScheme(scheme))) {
     return false;
   }
 
   nsIIOService* ios = nsContentUtils::GetIOService();
   if (!ios)
     return false;
 
@@ -506,17 +506,17 @@ GetExtensionFromURI(nsIURI* uri, nsCStri
 
 /**
  * Checks whether a plugin exists and is enabled for the extension
  * in the given URI. The MIME type is returned in the mimeType out parameter.
  */
 bool
 IsPluginEnabledByExtension(nsIURI* uri, nsCString& mimeType)
 {
-  nsCAutoString ext;
+  nsAutoCString ext;
   GetExtensionFromURI(uri, ext);
 
   if (ext.IsEmpty()) {
     return false;
   }
 
   nsRefPtr<nsPluginHost> pluginHost =
     already_AddRefed<nsPluginHost>(nsPluginHost::GetInst());
@@ -1096,18 +1096,18 @@ nsObjectLoadingContent::CheckLoadPolicy(
                                           thisContent,
                                           mContentType,
                                           nullptr, //extra
                                           aContentPolicy,
                                           nsContentUtils::GetContentPolicy(),
                                           nsContentUtils::GetSecurityManager());
   NS_ENSURE_SUCCESS(rv, false);
   if (NS_CP_REJECTED(*aContentPolicy)) {
-    nsCAutoString uri;
-    nsCAutoString baseUri;
+    nsAutoCString uri;
+    nsAutoCString baseUri;
     mURI->GetSpec(uri);
     mURI->GetSpec(baseUri);
     LOG(("OBJLC [%p]: Content policy denied load of %s (base %s)",
          this, uri.get(), baseUri.get()));
     return false;
   }
 
   return true;
@@ -1170,17 +1170,17 @@ nsObjectLoadingContent::UpdateObjectPara
   nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
   NS_ASSERTION(thisContent, "Must be an instance of content");
 
   uint32_t caps = GetCapabilities();
   LOG(("OBJLC [%p]: Updating object parameters", this));
 
   nsresult rv;
-  nsCAutoString newMime;
+  nsAutoCString newMime;
   nsCOMPtr<nsIURI> newURI;
   nsCOMPtr<nsIURI> newBaseURI;
   ObjectType newType;
   bool isJava = false;
   // Set if this state can't be used to load anything, forces eType_Null
   bool stateInvalid = false;
   // Indicates what parameters changed.
   // eParamChannelChanged - means parameters that affect channel opening
@@ -1374,17 +1374,17 @@ nsObjectLoadingContent::UpdateObjectPara
     bool caseOne = binaryChannelType
                    && typeHint != eType_Null
                    && typeHint != eType_Document;
     bool caseTwo = typeHint == eType_Plugin;
     if (caseOne || caseTwo) {
         // Set the type we'll use for dispatch on the channel.  Otherwise we could
         // end up trying to dispatch to a nsFrameLoader, which will complain that
         // it couldn't find a way to handle application/octet-stream
-        nsCAutoString typeHint, dummy;
+        nsAutoCString typeHint, dummy;
         NS_ParseContentType(newMime, typeHint, dummy);
         if (!typeHint.IsEmpty()) {
           mChannel->SetContentType(typeHint);
         }
     } else if (binaryChannelType
                && IsPluginEnabledByExtension(newURI, newMime)) {
       mChannel->SetContentType(newMime);
     } else {
@@ -2149,19 +2149,19 @@ nsObjectLoadingContent::PluginCrashed(ns
   LoadFallback(eFallbackCrashed, true);
 
   // send nsPluginCrashedEvent
   nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
 
   // Note that aPluginTag in invalidated after we're called, so copy 
   // out any data we need now.
-  nsCAutoString pluginName;
+  nsAutoCString pluginName;
   aPluginTag->GetName(pluginName);
-  nsCAutoString pluginFilename;
+  nsAutoCString pluginFilename;
   aPluginTag->GetFilename(pluginFilename);
 
   nsCOMPtr<nsIRunnable> ev =
     new nsPluginCrashedEvent(thisContent,
                              pluginDumpID,
                              browserDumpID,
                              NS_ConvertUTF8toUTF16(pluginName),
                              NS_ConvertUTF8toUTF16(pluginFilename),
--- a/content/base/src/nsReferencedElement.cpp
+++ b/content/base/src/nsReferencedElement.cpp
@@ -20,23 +20,23 @@ nsReferencedElement::Reset(nsIContent* a
 {
   NS_ABORT_IF_FALSE(aFromContent, "Reset() expects non-null content pointer");
 
   Unlink();
 
   if (!aURI)
     return;
 
-  nsCAutoString refPart;
+  nsAutoCString refPart;
   aURI->GetRef(refPart);
   // Unescape %-escapes in the reference. The result will be in the
   // origin charset of the URL, hopefully...
   NS_UnescapeURL(refPart);
 
-  nsCAutoString charset;
+  nsAutoCString charset;
   aURI->GetOriginCharset(charset);
   nsAutoString ref;
   nsresult rv = nsContentUtils::ConvertStringFromCharset(charset, refPart, ref);
   if (NS_FAILED(rv)) {
     CopyUTF8toUTF16(refPart, ref);
   }
   if (ref.IsEmpty())
     return;
--- a/content/base/src/nsScriptLoader.cpp
+++ b/content/base/src/nsScriptLoader.cpp
@@ -611,17 +611,17 @@ nsScriptLoader::ProcessScriptElement(nsI
     bool inlineOK;
     rv = csp->GetAllowsInlineScript(&inlineOK);
     NS_ENSURE_SUCCESS(rv, false);
 
     if (!inlineOK) {
       PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("CSP blocked inline scripts (2)"));
       // gather information to log with violation report
       nsIURI* uri = mDocument->GetDocumentURI();
-      nsCAutoString asciiSpec;
+      nsAutoCString asciiSpec;
       uri->GetAsciiSpec(asciiSpec);
       nsAutoString scriptText;
       aElement->GetScriptText(scriptText);
 
       // cap the length of the script sample at 40 chars
       if (scriptText.Length() > 40) {
         scriptText.Truncate(40);
         scriptText.Append(NS_LITERAL_STRING("..."));
@@ -824,17 +824,17 @@ nsScriptLoader::EvaluateScript(nsScriptL
   context->SetProcessingScriptTag(true);
 
   // Update our current script.
   nsCOMPtr<nsIScriptElement> oldCurrent = mCurrentScript;
   mCurrentScript = aRequest->mElement;
 
   // It's very important to use aRequest->mURI, not the final URI of the channel
   // aRequest ended up getting script data from, as the script filename.
-  nsCAutoString url;
+  nsAutoCString url;
   nsContentUtils::GetWrapperSafeScriptFilename(mDocument, aRequest->mURI, url);
 
   bool isUndefined;
   rv = context->EvaluateString(aScript, globalObject->GetGlobalJSObject(),
                                mDocument->NodePrincipal(),
                                aRequest->mOriginPrincipal,
                                url.get(), aRequest->mLineNo,
                                JSVersion(aRequest->mJSVersion), nullptr,
@@ -990,17 +990,17 @@ nsScriptLoader::ConvertToUTF16(nsIChanne
                                uint32_t aLength, const nsAString& aHintCharset,
                                nsIDocument* aDocument, nsString& aString)
 {
   if (!aLength) {
     aString.Truncate();
     return NS_OK;
   }
 
-  nsCAutoString characterSet;
+  nsAutoCString characterSet;
 
   nsresult rv = NS_OK;
   if (aChannel) {
     rv = aChannel->GetContentCharset(characterSet);
   }
 
   if (!aHintCharset.IsEmpty() && (NS_FAILED(rv) || characterSet.IsEmpty())) {
     // charset name is always ASCII.
--- a/content/base/src/nsWebSocket.cpp
+++ b/content/base/src/nsWebSocket.cpp
@@ -184,17 +184,17 @@ nsWebSocket::CloseConnection(uint16_t aR
 }
 
 nsresult
 nsWebSocket::ConsoleError()
 {
   NS_ABORT_IF_FALSE(NS_IsMainThread(), "Not running on main thread");
   nsresult rv;
 
-  nsCAutoString targetSpec;
+  nsAutoCString targetSpec;
   rv = mURI->GetSpec(targetSpec);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to get targetSpec");
   } else {
     NS_ConvertUTF8toUTF16 specUTF16(targetSpec);
     const PRUnichar *formatStrings[] = { specUTF16.get() };
 
     if (mReadyState < nsIWebSocket::OPEN) {
@@ -943,45 +943,45 @@ nsWebSocket::ParseURL(const nsString& aU
 
   nsCOMPtr<nsIURI> uri;
   rv = NS_NewURI(getter_AddRefs(uri), aURL);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
 
   nsCOMPtr<nsIURL> parsedURL(do_QueryInterface(uri, &rv));
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
 
-  nsCAutoString fragment;
+  nsAutoCString fragment;
   rv = parsedURL->GetRef(fragment);
   NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && fragment.IsEmpty(),
                  NS_ERROR_DOM_SYNTAX_ERR);
 
-  nsCAutoString scheme;
+  nsAutoCString scheme;
   rv = parsedURL->GetScheme(scheme);
   NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && !scheme.IsEmpty(),
                  NS_ERROR_DOM_SYNTAX_ERR);
 
-  nsCAutoString host;
+  nsAutoCString host;
   rv = parsedURL->GetAsciiHost(host);
   NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && !host.IsEmpty(), NS_ERROR_DOM_SYNTAX_ERR);
 
   int32_t port;
   rv = parsedURL->GetPort(&port);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
 
   rv = NS_CheckPortSafety(port, scheme.get());
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
 
-  nsCAutoString filePath;
+  nsAutoCString filePath;
   rv = parsedURL->GetFilePath(filePath);
   if (filePath.IsEmpty()) {
     filePath.AssignLiteral("/");
   }
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
 
-  nsCAutoString query;
+  nsAutoCString query;
   rv = parsedURL->GetQuery(query);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
 
   if (scheme.LowerCaseEqualsLiteral("ws")) {
      mSecure = false;
      mPort = (port == -1) ? DEFAULT_WS_SCHEME_PORT : port;
   } else if (scheme.LowerCaseEqualsLiteral("wss")) {
     mSecure = true;
@@ -1088,17 +1088,17 @@ nsWebSocket::DontKeepAliveAnyMore()
 nsresult
 nsWebSocket::UpdateURI()
 {
   // Check for Redirections
   nsCOMPtr<nsIURI> uri;
   nsresult rv = mChannel->GetURI(getter_AddRefs(uri));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   rv = uri->GetSpec(spec);
   NS_ENSURE_SUCCESS(rv, rv);
   CopyUTF8toUTF16(spec, mEffectiveURL);
 
   bool isWSS = false;
   rv = uri->SchemeIs("wss", &isWSS);
   NS_ENSURE_SUCCESS(rv, rv);
   mSecure = isWSS ? true : false;
@@ -1337,17 +1337,17 @@ nsWebSocket::Close(uint16_t code, const 
   uint16_t closeCode = 0;
   if (argc >= 1) {
     if (code != 1000 && (code < 3000 || code > 4999)) {
       return NS_ERROR_DOM_INVALID_ACCESS_ERR;
     }
     closeCode = code;
   }
 
-  nsCAutoString closeReason;
+  nsAutoCString closeReason;
   if (argc >= 2) {
     CopyUTF16toUTF8(reason, closeReason);
 
     // The API requires the UTF-8 string to be 123 or less bytes
     if (closeReason.Length() > 123) {
       return NS_ERROR_DOM_SYNTAX_ERR;
     }
   }
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -218,17 +218,17 @@ NS_IMPL_ISUPPORTS2(nsMultipartProxyListe
 
 NS_IMETHODIMP
 nsMultipartProxyListener::OnStartRequest(nsIRequest *aRequest,
                                          nsISupports *ctxt)
 {
   nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
   NS_ENSURE_TRUE(channel, NS_ERROR_UNEXPECTED);
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   nsresult rv = channel->GetContentType(contentType);
 
   if (!contentType.EqualsLiteral("multipart/x-mixed-replace")) {
     return NS_ERROR_INVALID_ARG;
   }
 
   // If multipart/x-mixed-replace content, we'll insert a MIME
   // decoder in the pipeline to handle the content and pass it along
@@ -678,17 +678,17 @@ nsXMLHttpRequest::DetectCharset()
     return NS_OK;
   }
 
   nsCOMPtr<nsIChannel> channel = do_QueryInterface(mReadRequest);
   if (!channel) {
     channel = mChannel;
   }
 
-  nsCAutoString charsetVal;
+  nsAutoCString charsetVal;
   nsresult rv = channel ? channel->GetContentCharset(charsetVal) :
                 NS_ERROR_FAILURE;
   if (NS_SUCCEEDED(rv)) {
     rv = nsCharsetAlias::GetPreferred(charsetVal, mResponseCharset);
   }
 
   if (NS_FAILED(rv) || mResponseCharset.IsEmpty()) {
     // MS documentation states UTF-8 is default for responseText
@@ -879,17 +879,17 @@ nsXMLHttpRequest::CreatePartialBlob()
     return NS_OK;
   }
 
   // mBuilder can be null if the request has been canceled
   if (!mBuilder) {
     return NS_OK;
   }
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   if (mLoadTotal == mLoadTransferred) {
     mChannel->GetContentType(contentType);
   }
 
   return mBuilder->GetBlobInternal(NS_ConvertASCIItoUTF16(contentType),
                                    false, getter_AddRefs(mResponseBlob));
 }
 
@@ -1323,17 +1323,17 @@ nsXMLHttpRequest::GetAllResponseHeaders(
     return;
   }
 
   if (!mChannel) {
     return;
   }
 
   // Even non-http channels supply content type.
-  nsCAutoString value;
+  nsAutoCString value;
   if (NS_SUCCEEDED(mChannel->GetContentType(value))) {
     aResponseHeaders.AppendLiteral("Content-Type: ");
     AppendASCIItoUTF16(value, aResponseHeaders);
     if (NS_SUCCEEDED(mChannel->GetContentCharset(value)) && !value.IsEmpty()) {
       aResponseHeaders.AppendLiteral(";charset=");
       AppendASCIItoUTF16(value, aResponseHeaders);
     }
     aResponseHeaders.AppendLiteral("\r\n");
@@ -1440,17 +1440,17 @@ nsXMLHttpRequest::GetResponseHeader(cons
     for (i = 0; i < ArrayLength(kCrossOriginSafeHeaders); ++i) {
       if (header.LowerCaseEqualsASCII(kCrossOriginSafeHeaders[i])) {
         safeHeader = true;
         break;
       }
     }
 
     if (!safeHeader) {
-      nsCAutoString headerVal;
+      nsAutoCString headerVal;
       // The "Access-Control-Expose-Headers" header contains a comma separated
       // list of method names.
       httpChannel->
         GetResponseHeader(NS_LITERAL_CSTRING("Access-Control-Expose-Headers"),
                           headerVal);
       nsCCharSeparatedTokenizer exposeTokens(headerVal, ',');
       while(exposeTokens.hasMoreTokens()) {
         const nsDependentCSubstring& token = exposeTokens.nextToken();
@@ -1608,17 +1608,17 @@ nsXMLHttpRequest::CheckChannelForCrossSi
 
   // This is a cross-site request
   mState |= XML_HTTP_REQUEST_USE_XSITE_AC;
 
   // Check if we need to do a preflight request.
   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
   NS_ENSURE_TRUE(httpChannel, NS_ERROR_DOM_BAD_URI);
 
-  nsCAutoString method;
+  nsAutoCString method;
   httpChannel->GetRequestMethod(method);
   if (!mCORSUnsafeHeaders.IsEmpty() ||
       (mUpload && mUpload->HasListeners()) ||
       (!method.LowerCaseEqualsLiteral("get") &&
        !method.LowerCaseEqualsLiteral("post") &&
        !method.LowerCaseEqualsLiteral("head"))) {
     mState |= XML_HTTP_REQUEST_NEED_AC_PREFLIGHT;
   }
@@ -1744,17 +1744,17 @@ nsXMLHttpRequest::Open(const nsACString&
   if (NS_CP_REJECTED(shouldLoad)) {
     // Disallowed by content policy
     return NS_ERROR_CONTENT_BLOCKED;
   }
 
   // XXXbz this is wrong: we should only be looking at whether
   // user/password were passed, not at the values!  See bug 759624.
   if (user.WasPassed() && !user.Value().IsEmpty()) {
-    nsCAutoString userpass;
+    nsAutoCString userpass;
     CopyUTF16toUTF8(user.Value(), userpass);
     if (password.WasPassed() && !password.Value().IsEmpty()) {
       userpass.Append(':');
       AppendUTF16toUTF8(password.Value(), userpass);
     }
     uri->SetUserPass(userpass);
   }
 
@@ -1894,17 +1894,17 @@ bool nsXMLHttpRequest::CreateDOMFile(nsI
   } else {
     nsCOMPtr<nsIFileChannel> fc = do_QueryInterface(request);
     if (fc) {
       fc->GetFile(getter_AddRefs(file));
     }
   }
   bool fromFile = false;
   if (file) {
-    nsCAutoString contentType;
+    nsAutoCString contentType;
     mChannel->GetContentType(contentType);
     nsCOMPtr<nsISupports> cacheToken;
     if (cc) {
       cc->GetCacheToken(getter_AddRefs(cacheToken));
       // We need to call IsFromCache to determine whether the response is
       // fully cached (i.e. whether we can skip reading the response).
       cc->IsFromCache(&fromFile);
     } else {
@@ -2066,30 +2066,30 @@ nsXMLHttpRequest::OnStartRequest(nsIRequ
 
   DetectCharset();
 
   // Set up responseXML
   bool parseBody = mResponseType == XML_HTTP_RESPONSE_TYPE_DEFAULT ||
                      mResponseType == XML_HTTP_RESPONSE_TYPE_DOCUMENT;
   nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(mChannel));
   if (parseBody && httpChannel) {
-    nsCAutoString method;
+    nsAutoCString method;
     httpChannel->GetRequestMethod(method);
     parseBody = !method.EqualsLiteral("HEAD");
   }
 
   mIsHtml = false;
   mWarnAboutMultipartHtml = false;
   mWarnAboutSyncHtml = false;
   if (parseBody && NS_SUCCEEDED(status)) {
     // We can gain a huge performance win by not even trying to
     // parse non-XML data. This also protects us from the situation
     // where we have an XML document and sink, but HTML (or other)
     // parser, which can produce unreliable results.
-    nsCAutoString type;
+    nsAutoCString type;
     channel->GetContentType(type);
 
     if ((mResponseType == XML_HTTP_RESPONSE_TYPE_DOCUMENT) &&
         type.EqualsLiteral("text/html")) {
       // HTML parsing is only supported for responseType == "document" to
       // avoid running the parser and, worse, populating responseXML for
       // legacy users of XHR who use responseType == "" for retrieving the
       // responseText of text/html resources. This legacy case is so common
@@ -2259,17 +2259,17 @@ nsXMLHttpRequest::OnStopRequest(nsIReque
       CreateDOMFile(request);
     }
     if (mDOMFile) {
       mResponseBlob = mDOMFile;
       mDOMFile = nullptr;
     } else {
       // Smaller files may be written in cache map instead of separate files.
       // Also, no-store response cannot be written in persistent cache.
-      nsCAutoString contentType;
+      nsAutoCString contentType;
       mChannel->GetContentType(contentType);
       mBuilder->GetBlobInternal(NS_ConvertASCIItoUTF16(contentType),
                                 false, getter_AddRefs(mResponseBlob));
       mBuilder = nullptr;
     }
     NS_ASSERTION(mResponseBody.IsEmpty(), "mResponseBody should be empty");
     NS_ASSERTION(mResponseText.IsEmpty(), "mResponseText should be empty");
   }
@@ -2692,17 +2692,17 @@ nsXMLHttpRequest::Send(nsIVariant* aVari
   }
 
   // XXX We should probably send a warning to the JS console
   //     if there are no event listeners set and we are doing
   //     an asynchronous call.
 
   // Ignore argument if method is GET, there is no point in trying to
   // upload anything
-  nsCAutoString method;
+  nsAutoCString method;
   nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(mChannel));
 
   if (httpChannel) {
     httpChannel->GetRequestMethod(method); // If GET, method name will be uppercase
 
     if (!IsSystemXHR()) {
       // Get the referrer for the request.
       //
@@ -2774,38 +2774,38 @@ nsXMLHttpRequest::Send(nsIVariant* aVari
   mErrorLoad = false;
   mLoadLengthComputable = false;
   mLoadTotal = 0;
   mUploadProgress = 0;
   mUploadProgressMax = 0;
   if ((aVariant || !aBody.IsNull()) && httpChannel &&
       !method.EqualsLiteral("GET")) {
 
-    nsCAutoString charset;
-    nsCAutoString defaultContentType;
+    nsAutoCString charset;
+    nsAutoCString defaultContentType;
     nsCOMPtr<nsIInputStream> postDataStream;
 
     rv = GetRequestBody(aVariant, aBody, getter_AddRefs(postDataStream),
                         defaultContentType, charset);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (postDataStream) {
       // If no content type header was set by the client, we set it to
       // application/xml.
-      nsCAutoString contentType;
+      nsAutoCString contentType;
       if (NS_FAILED(httpChannel->
                       GetRequestHeader(NS_LITERAL_CSTRING("Content-Type"),
                                        contentType)) ||
           contentType.IsEmpty()) {
         contentType = defaultContentType;
       }
 
       // We don't want to set a charset for streams.
       if (!charset.IsEmpty()) {
-        nsCAutoString specifiedCharset;
+        nsAutoCString specifiedCharset;
         bool haveCharset;
         int32_t charsetStart, charsetEnd;
         rv = NS_ExtractCharsetFromContentType(contentType, specifiedCharset,
                                               &haveCharset, &charsetStart,
                                               &charsetEnd);
         if (NS_SUCCEEDED(rv)) {
           // special case: the extracted charset is quoted with single quotes
           // -- for the purpose of preserving what was set we want to handle
@@ -2821,17 +2821,17 @@ nsXMLHttpRequest::Send(nsIVariant* aVari
           // and it's the same charset, up to case, as |charset|, just send the
           // page-set content-type header.  Apparently at least
           // google-web-toolkit is broken and relies on the exact case of its
           // charset parameter, which makes things break if we use |charset|
           // (which is always a fully resolved charset per our charset alias
           // table, hence might be differently cased).
           if (!specifiedCharset.Equals(charset,
                                        nsCaseInsensitiveCStringComparator())) {
-            nsCAutoString newCharset("; charset=");
+            nsAutoCString newCharset("; charset=");
             newCharset.Append(charset);
             contentType.Replace(charsetStart, charsetEnd - charsetStart,
                                 newCharset);
           }
         }
       }
 
       // If necessary, wrap the stream in a buffered stream so as to guarantee
@@ -2871,21 +2871,21 @@ nsXMLHttpRequest::Send(nsIVariant* aVari
         uploadChannel->SetUploadStream(postDataStream, contentType, -1);
         // Reset the method to its original value
         httpChannel->SetRequestMethod(method);
       }
     }
   }
 
   if (httpChannel) {
-    nsCAutoString contentTypeHeader;
+    nsAutoCString contentTypeHeader;
     rv = httpChannel->GetRequestHeader(NS_LITERAL_CSTRING("Content-Type"),
                                        contentTypeHeader);
     if (NS_SUCCEEDED(rv)) {
-      nsCAutoString contentType, charset;
+      nsAutoCString contentType, charset;
       rv = NS_ParseContentType(contentTypeHeader, contentType, charset);
       NS_ENSURE_SUCCESS(rv, rv);
   
       if (!contentType.LowerCaseEqualsLiteral("text/plain") &&
           !contentType.LowerCaseEqualsLiteral("application/x-www-form-urlencoded") &&
           !contentType.LowerCaseEqualsLiteral("multipart/form-data")) {
         mCORSUnsafeHeaders.AppendElement(NS_LITERAL_CSTRING("Content-Type"));
       }
@@ -2955,17 +2955,17 @@ nsXMLHttpRequest::Send(nsIVariant* aVari
     AddLoadFlags(mChannel,
         nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY);
   }
 
   // Since we expect XML data, set the type hint accordingly
   // if the channel doesn't know any content type.
   // This means that we always try to parse local files as XML
   // ignoring return value, as this is not critical
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   if (NS_FAILED(mChannel->GetContentType(contentType)) ||
       contentType.IsEmpty() ||
       contentType.Equals(UNKNOWN_CONTENT_TYPE)) {
     mChannel->SetContentType(NS_LITERAL_CSTRING("application/xml"));
   }
 
   // We're about to send the request.  Start our timeout.
   mRequestSentTime = PR_Now();
--- a/content/base/test/TestGetURL.cpp
+++ b/content/base/test/TestGetURL.cpp
@@ -50,17 +50,17 @@ nsresult TestGetURL(const nsCString& aUR
 
   rv = xhr->Send(nullptr);
   TEST_ENSURE_SUCCESS(rv, "Send failed!");
 
   nsAutoString response;
   rv = xhr->GetResponseText(response);
   TEST_ENSURE_SUCCESS(rv, "GetResponse failed!");
 
-  nsCAutoString responseUTF8 = NS_ConvertUTF16toUTF8(response);
+  nsAutoCString responseUTF8 = NS_ConvertUTF16toUTF8(response);
   printf("#BEGIN\n");
   printf("%s", responseUTF8.get());
   printf("\n#EOF\n");
 
   return NS_OK;
 }
 
 int main(int argc, char** argv)
@@ -69,17 +69,17 @@ int main(int argc, char** argv)
     printf("Usage: TestGetURL <url>\n");
     exit(0);
   }
 
   ScopedXPCOM xpcom("XMLHttpRequest");
   if (xpcom.failed())
     return 1;
 
-  nsCAutoString targetURL(argv[1]);
+  nsAutoCString targetURL(argv[1]);
 
   int retval = 0;
   if (NS_FAILED(TestGetURL(targetURL))) {
     retval = 1;
   }
 
   return retval;
 }
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -3012,17 +3012,17 @@ WebGLContext::GetProgramInfoLog(nsIWebGL
     GetProgramInfoLog(static_cast<WebGLProgram*>(pobj), retval, rv);
     return rv.ErrorCode();
 }
 
 void
 WebGLContext::GetProgramInfoLog(WebGLProgram *prog, nsAString& retval,
                                 ErrorResult& rv)
 {
-    nsCAutoString s;
+    nsAutoCString s;
     GetProgramInfoLog(prog, s, rv);
     if (s.IsVoid())
         retval.SetIsVoid(true);
     else
         CopyASCIItoUTF16(s, retval);
 }
 
 void
@@ -3764,17 +3764,17 @@ WebGLContext::LinkProgram(WebGLProgram *
 
             // report shader/program infoLogs as warnings.
             // note that shader compilation errors can be deferred to linkProgram,
             // which is why we can't do anything in compileShader. In practice we could
             // report in compileShader the translation errors generated by ANGLE,
             // but it seems saner to keep a single way of obtaining shader infologs.
 
             ErrorResult rv;
-            nsCAutoString log;
+            nsAutoCString log;
 
             bool alreadyReportedShaderInfoLog = false;
 
             for (size_t i = 0; i < program->AttachedShaders().Length(); i++) {
 
                 WebGLShader* shader = program->AttachedShaders()[i];
                 
                 if (shader->CompileStatus())
@@ -5016,17 +5016,17 @@ WebGLContext::CompileShader(WebGLShader 
 #endif
         }
 
         if (!ShCompile(compiler, &s, 1, compileOptions)) {
             int len = 0;
             ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &len);
 
             if (len) {
-                nsCAutoString info;
+                nsAutoCString info;
                 info.SetLength(len);
                 ShGetInfoLog(compiler, info.BeginWriting());
                 shader->SetTranslationFailure(info);
             } else {
                 shader->SetTranslationFailure(NS_LITERAL_CSTRING("Internal error: failed to get shader info log"));
             }
             ShDestruct(compiler);
             shader->SetCompileStatus(false);
@@ -5092,17 +5092,17 @@ WebGLContext::CompileShader(WebGLShader 
                 shader->mAttributes.AppendElement(WebGLMappedIdentifier(
                                                     nsDependentCString(attribute_name),
                                                     nsDependentCString(mapped_name)));
             }
 
             int len = 0;
             ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &len);
 
-            nsCAutoString translatedSrc;
+            nsAutoCString translatedSrc;
             translatedSrc.SetLength(len);
             ShGetObjectCode(compiler, translatedSrc.BeginWriting());
 
             nsPromiseFlatCString translatedSrc2(translatedSrc);
             const char *ts = translatedSrc2.get();
 
             gl->fShaderSource(shadername, 1, &ts, NULL);
         } else { // not useShaderSourceTranslation
@@ -5334,17 +5334,17 @@ WebGLContext::GetShaderInfoLog(nsIWebGLS
     GetShaderInfoLog(static_cast<WebGLShader*>(sobj), retval, rv);
     return rv.ErrorCode();
 }
 
 void
 WebGLContext::GetShaderInfoLog(WebGLShader *shader, nsAString& retval,
                                ErrorResult& rv)
 {
-    nsCAutoString s;
+    nsAutoCString s;
     GetShaderInfoLog(shader, s, rv);
     if (s.IsVoid())
         retval.SetIsVoid(true);
     else
         CopyASCIItoUTF16(s, retval);
 }
 
 void
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -627,17 +627,17 @@ nsEventListenerManager::SetEventHandler(
     if (csp) {
       bool inlineOK;
       rv = csp->GetAllowsInlineScript(&inlineOK);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if ( !inlineOK ) {
         // gather information to log with violation report
         nsIURI* uri = doc->GetDocumentURI();
-        nsCAutoString asciiSpec;
+        nsAutoCString asciiSpec;
         if (uri)
           uri->GetAsciiSpec(asciiSpec);
         nsAutoString scriptSample, attr, tagName(NS_LITERAL_STRING("UNKNOWN"));
         aName->ToString(attr);
         nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(mTarget));
         if (domNode)
           domNode->GetNodeName(tagName);
         // build a "script sample" based on what we know about this element
@@ -748,17 +748,17 @@ nsEventListenerManager::CompileEventHand
       else if (aListenerStruct->mTypeAtom == nsGkAtoms::onendEvent)
         attrName = nsGkAtoms::onend;
 
       content->GetAttr(kNameSpaceID_None, attrName, handlerBody);
       body = &handlerBody;
     }
 
     uint32_t lineNo = 0;
-    nsCAutoString url (NS_LITERAL_CSTRING("-moz-evil:lying-event-listener"));
+    nsAutoCString url (NS_LITERAL_CSTRING("-moz-evil:lying-event-listener"));
     nsCOMPtr<nsIDocument> doc;
     if (content) {
       doc = content->OwnerDoc();
     } else {
       nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(mTarget);
       if (win) {
         doc = do_QueryInterface(win->GetExtantDocument());
       }
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -183,17 +183,17 @@ PrintDocTree(nsIDocShellTreeItem* aParen
   printf("DS %p  Type %s  Cnt %d  Doc %p  DW %p  EM %p%c",
     static_cast<void*>(parentAsDocShell.get()),
     type==nsIDocShellTreeItem::typeChrome?"Chrome":"Content",
     childWebshellCount, static_cast<void*>(doc.get()),
     static_cast<void*>(domwin.get()),
     static_cast<void*>(presContext ? presContext->EventStateManager() : nullptr),
     uri ? ' ' : '\n');
   if (uri) {
-    nsCAutoString spec;
+    nsAutoCString spec;
     uri->GetSpec(spec);
     printf("\"%s\"\n", spec.get());
   }
 
   if (childWebshellCount > 0) {
     for (int32_t i = 0; i < childWebshellCount; i++) {
       nsCOMPtr<nsIDocShellTreeItem> child;
       aParentItem->GetChildAt(i, getter_AddRefs(child));
@@ -5353,35 +5353,35 @@ void
 nsEventStateManager::WheelPrefs::Init(
                        nsEventStateManager::WheelPrefs::Index aIndex)
 {
   if (mInit[aIndex]) {
     return;
   }
   mInit[aIndex] = true;
 
-  nsCAutoString basePrefName;
+  nsAutoCString basePrefName;
   GetBasePrefName(aIndex, basePrefName);
 
-  nsCAutoString prefNameX(basePrefName);
+  nsAutoCString prefNameX(basePrefName);
   prefNameX.AppendLiteral("delta_multiplier_x");
   mMultiplierX[aIndex] =
     static_cast<double>(Preferences::GetInt(prefNameX.get(), 100)) / 100;
 
-  nsCAutoString prefNameY(basePrefName);
+  nsAutoCString prefNameY(basePrefName);
   prefNameY.AppendLiteral("delta_multiplier_y");
   mMultiplierY[aIndex] =
     static_cast<double>(Preferences::GetInt(prefNameY.get(), 100)) / 100;
 
-  nsCAutoString prefNameZ(basePrefName);
+  nsAutoCString prefNameZ(basePrefName);
   prefNameZ.AppendLiteral("delta_multiplier_z");
   mMultiplierZ[aIndex] =
     static_cast<double>(Preferences::GetInt(prefNameZ.get(), 100)) / 100;
 
-  nsCAutoString prefNameAction(basePrefName);
+  nsAutoCString prefNameAction(basePrefName);
   prefNameAction.AppendLiteral("action");
   mActions[aIndex] =
     static_cast<Action>(Preferences::GetInt(prefNameAction.get(),
                                             ACTION_SCROLL));
   if (mActions[aIndex] < ACTION_NONE || mActions[aIndex] > ACTION_LAST) {
     NS_WARNING("Unsupported action pref value, replaced with 'Scroll'.");
     mActions[aIndex] = ACTION_SCROLL;
   }
--- a/content/events/src/nsXMLEventsManager.cpp
+++ b/content/events/src/nsXMLEventsManager.cpp
@@ -37,17 +37,17 @@ bool nsXMLEventsListener::InitXMLEventsL
   nsAutoString handlerURIStr;
   bool hasHandlerURI = false;
   nsIContent *handler = nullptr;
   nsAutoString observerID;
   nsAutoString targetIdref;
   
   if (aContent->GetAttr(nameSpaceID, nsGkAtoms::handler, handlerURIStr)) {
     hasHandlerURI = true;
-    nsCAutoString handlerRef;
+    nsAutoCString handlerRef;
     nsCOMPtr<nsIURI> handlerURI;
     bool equals = false;
     nsIURI *docURI = aDocument->GetDocumentURI();
     nsIURI *baseURI = aDocument->GetDocBaseURI();
     rv = NS_NewURI( getter_AddRefs(handlerURI), handlerURIStr, nullptr, baseURI);
     if (NS_SUCCEEDED(rv)) {
       handlerURI->GetRef(handlerRef);
       // We support only XML Events Basic.
--- a/content/html/content/src/nsFormSubmission.cpp
+++ b/content/html/content/src/nsFormSubmission.cpp
@@ -123,17 +123,17 @@ nsFSURLEncoded::AddNameValuePair(const n
                                  const nsAString& aValue)
 {
   // Encode value
   nsCString convValue;
   nsresult rv = URLEncode(aValue, convValue);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Encode name
-  nsCAutoString convName;
+  nsAutoCString convName;
   rv = URLEncode(aName, convName);
   NS_ENSURE_SUCCESS(rv, rv);
 
 
   // Append data to string
   if (mQueryString.IsEmpty()) {
     mQueryString += convName + NS_LITERAL_CSTRING("=") + convValue;
   } else {
@@ -255,17 +255,17 @@ nsFSURLEncoded::GetEncodedSubmission(nsI
   *aPostDataStream = nullptr;
 
   if (mMethod == NS_FORM_METHOD_POST) {
 
     bool isMailto = false;
     aURI->SchemeIs("mailto", &isMailto);
     if (isMailto) {
 
-      nsCAutoString path;
+      nsAutoCString path;
       rv = aURI->GetPath(path);
       NS_ENSURE_SUCCESS(rv, rv);
 
       HandleMailtoSubject(path);
 
       // Append the body to and force-plain-text args to the mailto line
       nsCString escapedBody;
       escapedBody.Adopt(nsEscape(mQueryString.get(), url_XAlphas));
@@ -313,22 +313,22 @@ nsFSURLEncoded::GetEncodedSubmission(nsI
       return NS_OK;
     }
 
     nsCOMPtr<nsIURL> url = do_QueryInterface(aURI);
     if (url) {
       url->SetQuery(mQueryString);
     }
     else {
-      nsCAutoString path;
+      nsAutoCString path;
       rv = aURI->GetPath(path);
       NS_ENSURE_SUCCESS(rv, rv);
       // Bug 42616: Trim off named anchor and save it to add later
       int32_t namedAnchorPos = path.FindChar('#');
-      nsCAutoString namedAnchor;
+      nsAutoCString namedAnchor;
       if (kNotFound != namedAnchorPos) {
         path.Right(namedAnchor, (path.Length() - namedAnchorPos));
         path.Truncate(namedAnchorPos);
       }
 
       // Chop off old query string (bug 25330, 57333)
       // Only do this for GET not POST (bug 41585)
       int32_t queryStart = path.FindChar('?');
@@ -353,17 +353,17 @@ nsFSURLEncoded::URLEncode(const nsAStrin
 {
   // convert to CRLF breaks
   PRUnichar* convertedBuf =
     nsLinebreakConverter::ConvertUnicharLineBreaks(PromiseFlatString(aStr).get(),
                                                    nsLinebreakConverter::eLinebreakAny,
                                                    nsLinebreakConverter::eLinebreakNet);
   NS_ENSURE_TRUE(convertedBuf, NS_ERROR_OUT_OF_MEMORY);
 
-  nsCAutoString encodedBuf;
+  nsAutoCString encodedBuf;
   nsresult rv = EncodeVal(nsDependentString(convertedBuf), encodedBuf, false);
   nsMemory::Free(convertedBuf);
   NS_ENSURE_SUCCESS(rv, rv);
 
   char* escapedBuf = nsEscape(encodedBuf.get(), url_XPAlphas);
   NS_ENSURE_TRUE(escapedBuf, NS_ERROR_OUT_OF_MEMORY);
   aEncoded.Adopt(escapedBuf);
 
@@ -403,26 +403,26 @@ nsFSMultipartFormData::GetSubmissionBody
   return mPostDataStream;
 }
 
 nsresult
 nsFSMultipartFormData::AddNameValuePair(const nsAString& aName,
                                         const nsAString& aValue)
 {
   nsCString valueStr;
-  nsCAutoString encodedVal;
+  nsAutoCString encodedVal;
   nsresult rv = EncodeVal(aValue, encodedVal, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   valueStr.Adopt(nsLinebreakConverter::
                  ConvertLineBreaks(encodedVal.get(),
                                    nsLinebreakConverter::eLinebreakAny,
                                    nsLinebreakConverter::eLinebreakNet));
 
-  nsCAutoString nameStr;
+  nsAutoCString nameStr;
   rv = EncodeVal(aName, nameStr, true);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Make MIME block for name/value pair
 
   // XXX: name parameter should be encoded per RFC 2231
   // RFC 2388 specifies that RFC 2047 be used, but I think it's not 
   // consistent with MIME standard.
@@ -435,17 +435,17 @@ nsFSMultipartFormData::AddNameValuePair(
   return NS_OK;
 }
 
 nsresult
 nsFSMultipartFormData::AddNameFilePair(const nsAString& aName,
                                        nsIDOMBlob* aBlob)
 {
   // Encode the control name
-  nsCAutoString nameStr;
+  nsAutoCString nameStr;
   nsresult rv = EncodeVal(aName, nameStr, true);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCString filename, contentType;
   nsCOMPtr<nsIInputStream> fileStream;
   if (aBlob) {
     // Get and encode the filename
     nsAutoString filename16;
@@ -527,17 +527,17 @@ nsFSMultipartFormData::GetEncodedSubmiss
 {
   nsresult rv;
 
   // Make header
   nsCOMPtr<nsIMIMEInputStream> mimeStream
     = do_CreateInstance("@mozilla.org/network/mime-input-stream;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   GetContentType(contentType);
   mimeStream->AddHeader("Content-Type", contentType.get());
   mimeStream->SetAddContentLength(true);
   mimeStream->SetData(GetSubmissionBody());
 
   *aPostDataStream = mimeStream.forget().get();
 
   return NS_OK;
@@ -616,17 +616,17 @@ nsFSTextPlain::GetEncodedSubmission(nsIU
   nsresult rv = NS_OK;
 
   // XXX HACK We are using the standard URL mechanism to give the body to the
   // mailer instead of passing the post data stream to it, since that sounds
   // hard.
   bool isMailto = false;
   aURI->SchemeIs("mailto", &isMailto);
   if (isMailto) {
-    nsCAutoString path;
+    nsAutoCString path;
     rv = aURI->GetPath(path);
     NS_ENSURE_SUCCESS(rv, rv);
 
     HandleMailtoSubject(path);
 
     // Append the body to and force-plain-text args to the mailto line
     char* escapedBuf = nsEscape(NS_ConvertUTF16toUTF8(mBody).get(),
                                 url_XAlphas);
@@ -672,17 +672,17 @@ nsFSTextPlain::GetEncodedSubmission(nsIU
 }
 
 // --------------------------------------------------------------------------
 
 nsEncodingFormSubmission::nsEncodingFormSubmission(const nsACString& aCharset,
                                                    nsIContent* aOriginatingElement)
   : nsFormSubmission(aCharset, aOriginatingElement)
 {
-  nsCAutoString charset(aCharset);
+  nsAutoCString charset(aCharset);
   // canonical name is passed so that we just have to check against
   // *our* canonical names listed in charsetaliases.properties
   if (charset.EqualsLiteral("ISO-8859-1")) {
     charset.AssignLiteral("windows-1252");
   }
 
   if (!(charset.EqualsLiteral("UTF-8") || charset.EqualsLiteral("gb18030"))) {
     NS_ConvertUTF8toUTF16 charsetUtf16(charset);
@@ -812,17 +812,17 @@ GetSubmissionFromForm(nsGenericHTMLEleme
   if (aOriginatingElement &&
       aOriginatingElement->HasAttr(kNameSpaceID_None, nsGkAtoms::formmethod)) {
     GetEnumAttr(aOriginatingElement, nsGkAtoms::formmethod, &method);
   } else {
     GetEnumAttr(aForm, nsGkAtoms::method, &method);
   }
 
   // Get charset
-  nsCAutoString charset;
+  nsAutoCString charset;
   GetSubmitCharset(aForm, charset);
 
   // We now have a canonical charset name, so we only have to check it
   // against canonical names.
 
   // use UTF-8 for UTF-16* (per WHATWG and existing practice of
   // MS IE/Opera).
   if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) {
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -2216,17 +2216,17 @@ nsGenericHTMLElement::GetFormControlFram
 nsGenericHTMLElement::GetPrimaryPresState(nsGenericHTMLElement* aContent,
                                           nsPresState** aPresState)
 {
   NS_ENSURE_ARG_POINTER(aPresState);
   *aPresState = nullptr;
 
   nsresult result = NS_OK;
 
-  nsCAutoString key;
+  nsAutoCString key;
   nsCOMPtr<nsILayoutHistoryState> history = GetLayoutHistoryAndKey(aContent, false, key);
 
   if (history) {
     // Get the pres state for this key, if it doesn't exist, create one
     result = history->GetState(key, aPresState);
     if (!*aPresState) {
       *aPresState = new nsPresState();
       result = history->AddState(key, *aPresState);
@@ -2283,17 +2283,17 @@ nsGenericHTMLElement::GetLayoutHistoryAn
 
   return history.forget();
 }
 
 bool
 nsGenericHTMLElement::RestoreFormControlState(nsGenericHTMLElement* aContent,
                                               nsIFormControl* aControl)
 {
-  nsCAutoString key;
+  nsAutoCString key;
   nsCOMPtr<nsILayoutHistoryState> history = GetLayoutHistoryAndKey(aContent, true, key);
   if (!history) {
     return false;
   }
 
   nsPresState *state;
   // Get the pres state for this key
   nsresult rv = history->GetState(key, &state);
@@ -2947,17 +2947,17 @@ nsGenericHTMLElement::GetURIAttr(nsIAtom
   }
 
   if (!uri) {
     // Just return the attr value
     GetAttr(kNameSpaceID_None, aAttr, aResult);
     return NS_OK;
   }
 
-  nsCAutoString spec;
+  nsAutoCString spec;
   uri->GetSpec(spec);
   CopyUTF8toUTF16(spec, aResult);
   return NS_OK;
 }
 
 bool
 nsGenericHTMLElement::GetURIAttr(nsIAtom* aAttr, nsIAtom* aBaseAttr, nsIURI** aURI) const
 {
@@ -3018,17 +3018,17 @@ nsGenericHTMLElement::GetURIListAttr(nsI
       if (iter != start) {
         if (!aResult.IsEmpty())
           aResult.Append(PRUnichar(' '));
         const nsSubstring& uriPart = Substring(start, iter);
         nsCOMPtr<nsIURI> attrURI;
         nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(attrURI),
                                                   uriPart, doc, baseURI);
         if (attrURI) {
-          nsCAutoString spec;
+          nsAutoCString spec;
           attrURI->GetSpec(spec);
           AppendUTF8toUTF16(spec, aResult);
         } else {
           aResult.Append(uriPart);
         }
       }
       start = iter = iter + 1;
       if (iter >= end)
--- a/content/html/content/src/nsHTMLAudioElement.cpp
+++ b/content/html/content/src/nsHTMLAudioElement.cpp
@@ -214,17 +214,17 @@ nsHTMLAudioElement::MozCurrentSampleOffs
   } else {
     *aRetVal = position * mChannels;
   }
   return NS_OK;
 }
 
 nsresult nsHTMLAudioElement::SetAcceptHeader(nsIHttpChannel* aChannel)
 {
-    nsCAutoString value(
+    nsAutoCString value(
 #ifdef MOZ_WEBM
       "audio/webm,"
 #endif
 #ifdef MOZ_OGG
       "audio/ogg,"
 #endif
 #ifdef MOZ_WAVE
       "audio/wav,"
--- a/content/html/content/src/nsHTMLInputElement.cpp
+++ b/content/html/content/src/nsHTMLInputElement.cpp
@@ -4249,17 +4249,17 @@ nsHTMLInputElement::GetValidationMessage
                                                  "FormValidationTextTooLong",
                                                  params, message);
       aValidationMessage = message;
       break;
     }
     case VALIDITY_STATE_VALUE_MISSING:
     {
       nsXPIDLString message;
-      nsCAutoString key;
+      nsAutoCString key;
       switch (mType)
       {
         case NS_FORM_INPUT_FILE:
           key.Assign("FormValidationFileMissing");
           break;
         case NS_FORM_INPUT_CHECKBOX:
           key.Assign("FormValidationCheckboxMissing");
           break;
@@ -4272,17 +4272,17 @@ nsHTMLInputElement::GetValidationMessage
       rv = nsContentUtils::GetLocalizedString(nsContentUtils::eDOM_PROPERTIES,
                                               key.get(), message);
       aValidationMessage = message;
       break;
     }
     case VALIDITY_STATE_TYPE_MISMATCH:
     {
       nsXPIDLString message;
-      nsCAutoString key;
+      nsAutoCString key;
       if (mType == NS_FORM_INPUT_EMAIL) {
         key.AssignLiteral("FormValidationInvalidEmail");
       } else if (mType == NS_FORM_INPUT_URL) {
         key.AssignLiteral("FormValidationInvalidURL");
       } else {
         return NS_ERROR_UNEXPECTED;
       }
       rv = nsContentUtils::GetLocalizedString(nsContentUtils::eDOM_PROPERTIES,
@@ -4405,26 +4405,26 @@ nsHTMLInputElement::IsValidEmailAddressL
 
   return !tokenizer.lastTokenEndedWithSeparator();
 }
 
 //static
 bool
 nsHTMLInputElement::IsValidEmailAddress(const nsAString& aValue)
 {
-  nsCAutoString value = NS_ConvertUTF16toUTF8(aValue);
+  nsAutoCString value = NS_ConvertUTF16toUTF8(aValue);
   uint32_t i = 0;
   uint32_t length = value.Length();
 
   // Puny-encode the string if needed before running the validation algorithm.
   nsCOMPtr<nsIIDNService> idnSrv = do_GetService(NS_IDNSERVICE_CONTRACTID);
   if (idnSrv) {
     bool ace;
     if (NS_SUCCEEDED(idnSrv->IsACE(value, &ace)) && !ace) {
-      nsCAutoString punyCodedValue;
+      nsAutoCString punyCodedValue;
       if (NS_SUCCEEDED(idnSrv->ConvertUTF8toACE(value, punyCodedValue))) {
         value = punyCodedValue;
         length = value.Length();
       }
     }
   } else {
     NS_ERROR("nsIIDNService isn't present!");
   }
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -501,17 +501,17 @@ NS_IMETHODIMP nsHTMLMediaElement::GetEnd
     *aEnded = mDecoder->IsEnded();
   }
   return NS_OK;
 }
 
 /* readonly attribute DOMString currentSrc; */
 NS_IMETHODIMP nsHTMLMediaElement::GetCurrentSrc(nsAString & aCurrentSrc)
 {
-  nsCAutoString src;
+  nsAutoCString src;
   GetCurrentSpec(src);
   aCurrentSrc = NS_ConvertUTF8toUTF16(src);
   return NS_OK;
 }
 
 /* readonly attribute unsigned short networkState; */
 NS_IMETHODIMP nsHTMLMediaElement::GetNetworkState(uint16_t *aNetworkState)
 {
@@ -530,17 +530,17 @@ nsHTMLMediaElement::OnChannelRedirect(ns
 
   // Handle forwarding of Range header so that the intial detection
   // of seeking support (via result code 206) works across redirects.
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(aChannel);
   NS_ENSURE_STATE(http);
 
   NS_NAMED_LITERAL_CSTRING(rangeHdr, "Range");
  
-  nsCAutoString rangeVal;
+  nsAutoCString rangeVal;
   if (NS_SUCCEEDED(http->GetRequestHeader(rangeHdr, rangeVal))) {
     NS_ENSURE_STATE(!rangeVal.IsEmpty());
 
     http = do_QueryInterface(aNewChannel);
     NS_ENSURE_STATE(http);
  
     nsresult rv = http->SetRequestHeader(rangeHdr, rangeVal, false);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2427,17 +2427,17 @@ nsresult nsHTMLMediaElement::InitializeD
 }
 
 nsresult nsHTMLMediaElement::InitializeDecoderForChannel(nsIChannel *aChannel,
                                                          nsIStreamListener **aListener)
 {
   NS_ASSERTION(mLoadingSrc, "mLoadingSrc must already be set");
   NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
 
-  nsCAutoString mimeType;
+  nsAutoCString mimeType;
   aChannel->GetContentType(mimeType);
 
   nsRefPtr<nsMediaDecoder> decoder = CreateDecoder(mimeType);
   if (!decoder) {
     nsAutoString src;
     GetCurrentSrc(src);
     NS_ConvertUTF8toUTF16 mimeUTF16(mimeType);
     const PRUnichar* params[] = { mimeUTF16.get(), src.get() };
@@ -2671,17 +2671,17 @@ nsresult nsHTMLMediaElement::NewURIFromS
   }
 
   uri.forget(aURI);
   return NS_OK;
 }
 
 void nsHTMLMediaElement::ProcessMediaFragmentURI()
 {
-  nsCAutoString ref;
+  nsAutoCString ref;
   GetCurrentSpec(ref);
   nsMediaFragmentURIParser parser(ref);
   parser.Parse();
   double start = parser.GetStartTime();
   if (mDecoder) {
     double end = parser.GetEndTime();
     if (end < 0.0 || end > start) {
       mFragmentEnd = end;
--- a/content/html/content/src/nsHTMLSharedElement.cpp
+++ b/content/html/content/src/nsHTMLSharedElement.cpp
@@ -211,17 +211,17 @@ nsHTMLSharedElement::GetHref(nsAString& 
   nsContentUtils::NewURIWithDocumentCharset(
     getter_AddRefs(uri), href, doc, doc->GetDocumentURI());
 
   if (!uri) {
     aValue = href;
     return NS_OK;
   }
   
-  nsCAutoString spec;
+  nsAutoCString spec;
   uri->GetSpec(spec);
   CopyUTF8toUTF16(spec, aValue);
 
   return NS_OK;
 }
 NS_IMETHODIMP
 nsHTMLSharedElement::SetHref(const nsAString& aValue)
 {
--- a/content/html/content/src/nsHTMLVideoElement.cpp
+++ b/content/html/content/src/nsHTMLVideoElement.cpp
@@ -145,17 +145,17 @@ nsHTMLVideoElement::IsAttributeMapped(co
 nsMapRuleToAttributesFunc
 nsHTMLVideoElement::GetAttributeMappingFunction() const
 {
   return &MapAttributesIntoRule;
 }
 
 nsresult nsHTMLVideoElement::SetAcceptHeader(nsIHttpChannel* aChannel)
 {
-  nsCAutoString value(
+  nsAutoCString value(
 #ifdef MOZ_WEBM
       "video/webm,"
 #endif
 #ifdef MOZ_OGG
       "video/ogg,"
 #endif
       "video/*;q=0.9,"
 #ifdef MOZ_OGG
--- a/content/html/content/src/nsMediaFragmentURIParser.cpp
+++ b/content/html/content/src/nsMediaFragmentURIParser.cpp
@@ -254,18 +254,18 @@ bool nsMediaFragmentURIParser::ParseNPTS
 
 void nsMediaFragmentURIParser::Parse()
 {
   nsCCharSeparatedTokenizer tokenizer(mHash, '&');
   while (tokenizer.hasMoreTokens()) {
     const nsCSubstring& nv = tokenizer.nextToken();
     int32_t index = nv.FindChar('=');
     if (index >= 0) {
-      nsCAutoString name;
-      nsCAutoString value;
+      nsAutoCString name;
+      nsAutoCString value;
       NS_UnescapeURL(StringHead(nv, index), esc_Ref | esc_AlwaysCopy, name);
       NS_UnescapeURL(Substring(nv, index + 1, nv.Length()),
                      esc_Ref | esc_AlwaysCopy, value);
       nsAutoString a = NS_ConvertUTF8toUTF16(name);
       nsAutoString b = NS_ConvertUTF8toUTF16(value);
       mFragments.AppendElement(Pair(a, b));
     }
   }
--- a/content/html/content/src/nsMediaFragmentURIParser.h
+++ b/content/html/content/src/nsMediaFragmentURIParser.h
@@ -60,16 +60,16 @@ private:
   bool ParseNPTFraction(nsDependentSubstring& aString, double& aFraction);
   bool ParseNPTMMSS(nsDependentSubstring& aString, double& aTime);
   bool ParseNPTHHMMSS(nsDependentSubstring& aString, double& aTime);
   bool ParseNPTHH(nsDependentSubstring& aString, uint32_t& aHour);
   bool ParseNPTMM(nsDependentSubstring& aString, uint32_t& aMinute);
   bool ParseNPTSS(nsDependentSubstring& aString, uint32_t& aSecond);
 
   // Fragment portion of the URI given on construction
-  nsCAutoString mHash;
+  nsAutoCString mHash;
 
   // An array of name/value pairs containing the media fragments
   // parsed from the URI.
   nsTArray<Pair> mFragments;
 };
 
 #endif
--- a/content/html/document/src/ImageDocument.cpp
+++ b/content/html/document/src/ImageDocument.cpp
@@ -169,17 +169,17 @@ ImageListener::OnStartRequest(nsIRequest
   nsCOMPtr<nsPIDOMWindow> domWindow =
     do_QueryInterface(imgDoc->GetScriptGlobalObject());
   NS_ENSURE_TRUE(domWindow, NS_ERROR_UNEXPECTED);
 
   // Do a ShouldProcess check to see whether to keep loading the image.
   nsCOMPtr<nsIURI> channelURI;
   channel->GetURI(getter_AddRefs(channelURI));
 
-  nsCAutoString mimeType;
+  nsAutoCString mimeType;
   channel->GetContentType(mimeType);
 
   nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();
   nsCOMPtr<nsIPrincipal> channelPrincipal;
   if (secMan) {
     secMan->GetChannelPrincipal(channel, getter_AddRefs(channelPrincipal));
   }
   
@@ -539,17 +539,17 @@ NS_IMETHODIMP
 ImageDocument::OnStopDecode(imgIRequest *aRequest,
                             nsresult aStatus,
                             const PRUnichar *aStatusArg)
 {
   UpdateTitleAndCharset();
 
   // mImageContent can be null if the document is already destroyed
   if (NS_FAILED(aStatus) && mStringBundle && mImageContent) {
-    nsCAutoString src;
+    nsAutoCString src;
     mDocumentURI->GetSpec(src);
     NS_ConvertUTF8toUTF16 srcString(src);
     const PRUnichar* formatString[] = { srcString.get() };
     nsXPIDLString errorMsg;
     NS_NAMED_LITERAL_STRING(str, "InvalidImage");
     mStringBundle->FormatStringFromName(str.get(), formatString, 1,
                                         getter_Copies(errorMsg));
 
@@ -650,17 +650,17 @@ ImageDocument::CreateSyntheticDocument()
 
   mImageContent = NS_NewHTMLImageElement(nodeInfo.forget());
   if (!mImageContent) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
   nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mImageContent);
   NS_ENSURE_TRUE(imageLoader, NS_ERROR_UNEXPECTED);
 
-  nsCAutoString src;
+  nsAutoCString src;
   mDocumentURI->GetSpec(src);
 
   // Push a null JSContext on the stack so that code that runs within
   // the below code doesn't think it's being called by JS. See bug
   // 604262.
   nsCxPusher pusher;
   pusher.PushNull();
 
@@ -713,17 +713,17 @@ ImageDocument::CheckOverflowing(bool cha
   mFirstResize = false;
 
   return NS_OK;
 }
 
 void 
 ImageDocument::UpdateTitleAndCharset()
 {
-  nsCAutoString typeStr;
+  nsAutoCString typeStr;
   nsCOMPtr<imgIRequest> imageRequest;
   nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mImageContent);
   if (imageLoader) {
     imageLoader->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
                             getter_AddRefs(imageRequest));
   }
     
   if (imageRequest) {
--- a/content/html/document/src/MediaDocument.cpp
+++ b/content/html/document/src/MediaDocument.cpp
@@ -158,17 +158,17 @@ MediaDocument::StartDocumentLoad(const c
   // in UTF-8, we don't lose anything because the default empty value is 
   // considered synonymous with UTF-8. 
     
   nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aContainer));
 
   // not being able to set the charset is not critical.
   NS_ENSURE_TRUE(docShell, NS_OK); 
 
-  nsCAutoString charset;
+  nsAutoCString charset;
 
   nsCOMPtr<nsIAtom> csAtom;
   docShell->GetParentCharset(getter_AddRefs(csAtom));
   if (csAtom) {   // opening in a new tab
     csAtom->ToUTF8String(charset);
   }
 
   if (charset.IsEmpty() || charset.Equals("UTF-8")) {
@@ -293,22 +293,22 @@ void
 MediaDocument::GetFileName(nsAString& aResult)
 {
   aResult.Truncate();
 
   nsCOMPtr<nsIURL> url = do_QueryInterface(mDocumentURI);
   if (!url)
     return;
 
-  nsCAutoString fileName;
+  nsAutoCString fileName;
   url->GetFileName(fileName);
   if (fileName.IsEmpty())
     return;
 
-  nsCAutoString docCharset;
+  nsAutoCString docCharset;
   // Now that the charset is set in |StartDocumentLoad| to the charset of
   // the document viewer instead of a bogus value ("ISO-8859-1" set in
   // |nsDocument|'s ctor), the priority is given to the current charset. 
   // This is necessary to deal with a media document being opened in a new 
   // window or a new tab, in which case |originCharset| of |nsIURI| is not 
   // reliable.
   if (mCharacterSetSource != kCharsetUninitialized) {  
     docCharset = mCharacterSet;
--- a/content/html/document/src/PluginDocument.cpp
+++ b/content/html/document/src/PluginDocument.cpp
@@ -276,17 +276,17 @@ PluginDocument::CreateSyntheticPluginDoc
   // fill viewport and auto-resize
   NS_NAMED_LITERAL_STRING(percent100, "100%");
   mPluginContent->SetAttr(kNameSpaceID_None, nsGkAtoms::width, percent100,
                           false);
   mPluginContent->SetAttr(kNameSpaceID_None, nsGkAtoms::height, percent100,
                           false);
 
   // set URL
-  nsCAutoString src;
+  nsAutoCString src;
   mDocumentURI->GetSpec(src);
   mPluginContent->SetAttr(kNameSpaceID_None, nsGkAtoms::src,
                           NS_ConvertUTF8toUTF16(src), false);
 
   // set mime type
   mPluginContent->SetAttr(kNameSpaceID_None, nsGkAtoms::type,
                           NS_ConvertUTF8toUTF16(mMimeType), false);
 
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -1422,17 +1422,17 @@ HTMLContentSink::Init(nsIDocument* aDoc,
   mRoot->AppendChildTo(mHead, false);
 
   mCurrentContext = new SinkContext(this);
   NS_ENSURE_TRUE(mCurrentContext, NS_ERROR_OUT_OF_MEMORY);
   mCurrentContext->Begin(eHTMLTag_html, mRoot, 0, -1);
   mContextStack.AppendElement(mCurrentContext);
 
 #ifdef DEBUG
-  nsCAutoString spec;
+  nsAutoCString spec;
   (void)aURI->GetSpec(spec);
   SINK_TRACE(gSinkLogModuleInfo, SINK_TRACE_CALLS,
              ("HTMLContentSink::Init: this=%p url='%s'",
               this, spec.get()));
 #endif
   return NS_OK;
 }
 
@@ -2126,17 +2126,17 @@ NS_IMETHODIMP
 HTMLContentSink::DumpContentModel()
 {
   FILE* out = ::fopen("rtest_html.txt", "a");
   if (out) {
     if (mDocument) {
       Element* root = mDocument->GetRootElement();
       if (root) {
         if (mDocumentURI) {
-          nsCAutoString buf;
+          nsAutoCString buf;
           mDocumentURI->GetSpec(buf);
           fputs(buf.get(), out);
         }
 
         fputs(";", out);
         root->DumpContent(out, 0, false);
         fputs(";\n", out);
       }
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -322,17 +322,17 @@ bool
 nsHTMLDocument::TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
                                int32_t& aCharsetSource, nsACString& aCharset)
 {
   if (aMarkupDV) {
     int32_t requestCharsetSource;
     nsresult rv = aMarkupDV->GetHintCharacterSetSource(&requestCharsetSource);
 
     if(NS_SUCCEEDED(rv) && kCharsetUninitialized != requestCharsetSource) {
-      nsCAutoString requestCharset;
+      nsAutoCString requestCharset;
       rv = aMarkupDV->GetHintCharacterSet(requestCharset);
       aMarkupDV->SetHintCharacterSetSource((int32_t)(kCharsetUninitialized));
 
       if(requestCharsetSource <= aCharsetSource)
         return true;
 
       if(NS_SUCCEEDED(rv)) {
         aCharsetSource = requestCharsetSource;
@@ -352,17 +352,17 @@ nsHTMLDocument::TryUserForcedCharset(nsI
                                      int32_t& aCharsetSource,
                                      nsACString& aCharset)
 {
   nsresult rv = NS_OK;
 
   if(kCharsetFromUserForced <= aCharsetSource)
     return true;
 
-  nsCAutoString forceCharsetFromDocShell;
+  nsAutoCString forceCharsetFromDocShell;
   if (aMarkupDV) {
     rv = aMarkupDV->GetForceCharacterSet(forceCharsetFromDocShell);
   }
 
   if(NS_SUCCEEDED(rv) && !forceCharsetFromDocShell.IsEmpty()) {
     aCharset = forceCharsetFromDocShell;
     //TODO: we should define appropriate constant for force charset
     aCharsetSource = kCharsetFromUserForced;
@@ -486,17 +486,17 @@ nsHTMLDocument::UseWeakDocTypeDefault(in
 bool
 nsHTMLDocument::TryDefaultCharset( nsIMarkupDocumentViewer* aMarkupDV,
                                    int32_t& aCharsetSource,
                                    nsACString& aCharset)
 {
   if(kCharsetFromUserDefault <= aCharsetSource)
     return true;
 
-  nsCAutoString defaultCharsetFromDocShell;
+  nsAutoCString defaultCharsetFromDocShell;
   if (aMarkupDV) {
     nsresult rv =
       aMarkupDV->GetDefaultCharacterSet(defaultCharsetFromDocShell);
     if(NS_SUCCEEDED(rv)) {
       aCharset = defaultCharsetFromDocShell;
 
       aCharsetSource = kCharsetFromUserDefault;
       return true;
@@ -535,17 +535,17 @@ nsHTMLDocument::StartDocumentLoad(const 
     MOZ_ASSERT(false, "Got a sink override. Should not happen for HTML doc.");
     return NS_ERROR_INVALID_ARG;
   }
   if (!mIsRegularHTML) {
     MOZ_ASSERT(false, "Must not set HTML doc to XHTML mode before load start.");
     return NS_ERROR_DOM_INVALID_STATE_ERR;
   }
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   aChannel->GetContentType(contentType);
 
   bool view = !strcmp(aCommand, "view") ||
               !strcmp(aCommand, "external-resource");
   bool viewSource = !strcmp(aCommand, "view-source");
   bool asData = !strcmp(aCommand, kLoadAsData);
   if(!(view || viewSource || asData)) {
     MOZ_ASSERT(false, "Bad parser command");
@@ -581,17 +581,17 @@ nsHTMLDocument::StartDocumentLoad(const 
   if (loadAsHtml5 && view) {
     // mDocumentURI hasn't been set, yet, so get the URI from the channel
     nsCOMPtr<nsIURI> uri;
     aChannel->GetOriginalURI(getter_AddRefs(uri));
     // Adapted from nsDocShell:
     // GetSpec can be expensive for some URIs, so check the scheme first.
     bool isAbout = false;
     if (uri && NS_SUCCEEDED(uri->SchemeIs("about", &isAbout)) && isAbout) {
-      nsCAutoString str;
+      nsAutoCString str;
       uri->GetSpec(str);
       if (str.EqualsLiteral("about:blank")) {
         loadAsHtml5 = false;    
       }
     }
   }
   
   CSSLoader()->SetCompatibilityMode(mCompatMode);
@@ -675,30 +675,30 @@ nsHTMLDocument::StartDocumentLoad(const 
      muCV = do_QueryInterface(cv);
   } else {
     muCV = do_QueryInterface(parentContentViewer);
     if (muCV) {
       muCVIsParent = true;
     }
   }
 
-  nsCAutoString urlSpec;
+  nsAutoCString urlSpec;
   uri->GetSpec(urlSpec);
 #ifdef DEBUG_charset
   printf("Determining charset for %s\n", urlSpec.get());
 #endif
 
   // These are the charset source and charset for our document
   int32_t charsetSource;
-  nsCAutoString charset;
+  nsAutoCString charset;
 
   // These are the charset source and charset for the parser.  This can differ
   // from that for the document if the channel is a wyciwyg channel.
   int32_t parserCharsetSource;
-  nsCAutoString parserCharset;
+  nsAutoCString parserCharset;
 
   nsCOMPtr<nsIWyciwygChannel> wyciwygChannel;
   
   // For error reporting
   nsHtml5TreeOpExecutor* executor = nullptr;
   if (loadAsHtml5) {
     executor = static_cast<nsHtml5TreeOpExecutor*> (mParser->GetContentSink());
   }
@@ -746,38 +746,38 @@ nsHTMLDocument::StartDocumentLoad(const 
         UseWeakDocTypeDefault(charsetSource, charset);
       }
     }
 
     bool isPostPage = false;
     // check if current doc is from POST command
     nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(aChannel));
     if (httpChannel) {
-      nsCAutoString methodStr;
+      nsAutoCString methodStr;
       rv = httpChannel->GetRequestMethod(methodStr);
       isPostPage = (NS_SUCCEEDED(rv) &&
                     methodStr.EqualsLiteral("POST"));
     }
 
     if (isPostPage && muCV && kCharsetFromHintPrevDoc > charsetSource) {
-      nsCAutoString requestCharset;
+      nsAutoCString requestCharset;
       muCV->GetPrevDocCharacterSet(requestCharset);
       if (!requestCharset.IsEmpty()) {
         charsetSource = kCharsetFromHintPrevDoc;
         charset = requestCharset;
       }
     }
 
     if (wyciwygChannel) {
       // We know for sure that the parser needs to be using UTF16.
       parserCharset = "UTF-16";
       parserCharsetSource = charsetSource < kCharsetFromChannel ?
         kCharsetFromChannel : charsetSource;
         
-      nsCAutoString cachedCharset;
+      nsAutoCString cachedCharset;
       int32_t cachedSource;
       rv = wyciwygChannel->GetCharsetAndSource(&cachedSource, cachedCharset);
       if (NS_SUCCEEDED(rv)) {
         if (cachedSource > charsetSource) {
           charsetSource = cachedSource;
           charset = cachedCharset;
         }
       } else {
@@ -931,17 +931,17 @@ nsHTMLDocument::GetDomain(nsAString& aDo
 {
   nsCOMPtr<nsIURI> uri;
   GetDomainURI(getter_AddRefs(uri));
 
   if (!uri) {
     return NS_ERROR_FAILURE;
   }
 
-  nsCAutoString hostName;
+  nsAutoCString hostName;
 
   if (NS_SUCCEEDED(uri->GetHost(hostName))) {
     CopyUTF8toUTF16(hostName, aDomain);
   } else {
     // If we can't get the host from the URI (e.g. about:, javascript:,
     // etc), just return an null string.
     SetDOMStringToNull(aDomain);
   }
@@ -958,51 +958,51 @@ nsHTMLDocument::SetDomain(const nsAStrin
   // Create new URI
   nsCOMPtr<nsIURI> uri;
   GetDomainURI(getter_AddRefs(uri));
 
   if (!uri) {
     return NS_ERROR_FAILURE;
   }
 
-  nsCAutoString newURIString;
+  nsAutoCString newURIString;
   if (NS_FAILED(uri->GetScheme(newURIString)))
     return NS_ERROR_FAILURE;
-  nsCAutoString path;
+  nsAutoCString path;
   if (NS_FAILED(uri->GetPath(path)))
     return NS_ERROR_FAILURE;
   newURIString.AppendLiteral("://");
   AppendUTF16toUTF8(aDomain, newURIString);
   newURIString.Append(path);
 
   nsCOMPtr<nsIURI> newURI;
   if (NS_FAILED(NS_NewURI(getter_AddRefs(newURI), newURIString)))
     return NS_ERROR_FAILURE;
 
   // Check new domain - must be a superdomain of the current host
   // For example, a page from foo.bar.com may set domain to bar.com,
   // but not to ar.com, baz.com, or fi.foo.bar.com.
-  nsCAutoString current, domain;
+  nsAutoCString current, domain;
   if (NS_FAILED(uri->GetAsciiHost(current)))
     current.Truncate();
   if (NS_FAILED(newURI->GetAsciiHost(domain)))
     domain.Truncate();
 
   bool ok = current.Equals(domain);
   if (current.Length() > domain.Length() &&
       StringEndsWith(current, domain) &&
       current.CharAt(current.Length() - domain.Length() - 1) == '.') {
     // We're golden if the new domain is the current page's base domain or a
     // subdomain of it.
     nsCOMPtr<nsIEffectiveTLDService> tldService =
       do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
     if (!tldService)
       return NS_ERROR_NOT_AVAILABLE;
 
-    nsCAutoString currentBaseDomain;
+    nsAutoCString currentBaseDomain;
     ok = NS_SUCCEEDED(tldService->GetBaseDomain(uri, 0, currentBaseDomain));
     NS_ASSERTION(StringEndsWith(domain, currentBaseDomain) ==
                  (domain.Length() >= currentBaseDomain.Length()),
                  "uh-oh!  slight optimization wasn't valid somehow!");
     ok = ok && domain.Length() >= currentBaseDomain.Length();
   }
   if (!ok) {
     // Error: illegal domain
@@ -1010,17 +1010,17 @@ nsHTMLDocument::SetDomain(const nsAStrin
   }
 
   return NodePrincipal()->SetDomain(newURI);
 }
 
 NS_IMETHODIMP
 nsHTMLDocument::GetURL(nsAString& aURL)
 {
-  nsCAutoString str;
+  nsAutoCString str;
 
   if (mDocumentURI) {
     mDocumentURI->GetSpec(str);
   }
 
   CopyUTF8toUTF16(str, aURL);
 
   return NS_OK;
@@ -1316,22 +1316,22 @@ nsHTMLDocument::Open(const nsAString& aC
     return rv;
   }
 
   if (!IsHTML() || mDisableDocWrite) {
     // No calling document.open() on XHTML
     return NS_ERROR_DOM_INVALID_STATE_ERR;
   }
 
-  nsCAutoString contentType;
+  nsAutoCString contentType;
   contentType.AssignLiteral("text/html");
   if (aOptionalArgCount > 0) {
     nsAutoString type;
     nsContentUtils::ASCIIToLower(aContentTypeOrUrl, type);
-    nsCAutoString actualType, dummy;
+    nsAutoCString actualType, dummy;
     NS_ParseContentType(NS_ConvertUTF16toUTF8(type), actualType, dummy);
     if (!actualType.EqualsLiteral("text/html") &&
         !type.EqualsLiteral("replace")) {
       contentType.AssignLiteral("text/plain");
     }
   }
 
   // If we already have a parser we ignore the document.open call.
@@ -1403,18 +1403,18 @@ nsHTMLDocument::Open(const nsAString& aC
 
   bool equals = false;
   if (NS_FAILED(callerPrincipal->Equals(NodePrincipal(), &equals)) ||
       !equals) {
 
 #ifdef DEBUG
     nsCOMPtr<nsIURI> callerDocURI = callerDoc->GetDocumentURI();
     nsCOMPtr<nsIURI> thisURI = nsIDocument::GetDocumentURI();
-    nsCAutoString callerSpec;
-    nsCAutoString thisSpec;
+    nsAutoCString callerSpec;
+    nsAutoCString thisSpec;
     if (callerDocURI) {
       callerDocURI->GetSpec(callerSpec);
     }
     if (thisURI) {
       thisURI->GetSpec(thisSpec);
     }
     printf("nsHTMLDocument::Open callerDoc %s this %s\n", callerSpec.get(), thisSpec.get());
 #endif
@@ -2215,17 +2215,17 @@ nsHTMLDocument::GetFormControls()
 
   return mFormControls;
 }
 
 nsresult
 nsHTMLDocument::CreateAndAddWyciwygChannel(void)
 {
   nsresult rv = NS_OK;
-  nsCAutoString url, originalSpec;
+  nsAutoCString url, originalSpec;
 
   mDocumentURI->GetSpec(originalSpec);
 
   // Generate the wyciwyg url
   url = NS_LITERAL_CSTRING("wyciwyg://")
       + nsPrintfCString("%d", gWyciwygSessionCnt++)
       + NS_LITERAL_CSTRING("/")
       + originalSpec;
@@ -3076,17 +3076,17 @@ ConvertToMidasInternalCommand(const nsAS
                                             outParam, outIsBoolean,
                                             outBooleanValue, false);
 }
 
 static bool
 ConvertToMidasInternalCommand(const nsAString & inCommandID,
                               nsACString& outCommandID)
 {
-  nsCAutoString dummyCString;
+  nsAutoCString dummyCString;
   nsAutoString dummyString;
   bool dummyBool;
   return ConvertToMidasInternalCommandInner(inCommandID, dummyString,
                                             outCommandID, dummyCString,
                                             dummyBool, dummyBool, true);
 }
 
 jsid
@@ -3149,17 +3149,17 @@ nsHTMLDocument::ExecCommand(const nsAStr
 {
   NS_ENSURE_ARG_POINTER(_retval);
 
   //  for optional parameters see dom/src/base/nsHistory.cpp: HistoryImpl::Go()
   //  this might add some ugly JS dependencies?
 
   *_retval = false;
 
-  nsCAutoString cmdToDispatch, paramStr;
+  nsAutoCString cmdToDispatch, paramStr;
   bool isBool, boolVal;
   if (!ConvertToMidasInternalCommand(commandID, value,
                                      cmdToDispatch, paramStr,
                                      isBool, boolVal)) {
     // Return false
     return NS_OK;
   }
 
@@ -3240,17 +3240,17 @@ nsHTMLDocument::ExecCommand(const nsAStr
 /* boolean queryCommandEnabled(in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandEnabled(const nsAString& commandID,
                                     bool* _retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = false;
 
-  nsCAutoString cmdToDispatch;
+  nsAutoCString cmdToDispatch;
   if (!ConvertToMidasInternalCommand(commandID, cmdToDispatch)) {
     // Return false
     return NS_OK;
   }
 
   // if editing is not on, bail
   NS_ENSURE_TRUE(IsEditingOnAfterFlush(), NS_ERROR_FAILURE);
 
@@ -3268,17 +3268,17 @@ nsHTMLDocument::QueryCommandEnabled(cons
 /* boolean queryCommandIndeterm (in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandIndeterm(const nsAString & commandID,
                                      bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = false;
 
-  nsCAutoString cmdToDispatch;
+  nsAutoCString cmdToDispatch;
   if (!ConvertToMidasInternalCommand(commandID, cmdToDispatch)) {
     // Return false
     return NS_OK;
   }
 
   // if editing is not on, bail
   NS_ENSURE_TRUE(IsEditingOnAfterFlush(), NS_ERROR_FAILURE);
 
@@ -3307,17 +3307,17 @@ nsHTMLDocument::QueryCommandIndeterm(con
 
 /* boolean queryCommandState(in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandState(const nsAString & commandID, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = false;
 
-  nsCAutoString cmdToDispatch, paramToCheck;
+  nsAutoCString cmdToDispatch, paramToCheck;
   bool dummy, dummy2;
   if (!ConvertToMidasInternalCommand(commandID, commandID,
                                      cmdToDispatch, paramToCheck,
                                      dummy, dummy2)) {
     // Return false
     return NS_OK;
   }
 
@@ -3376,30 +3376,30 @@ nsHTMLDocument::QueryCommandState(const 
 /* boolean queryCommandSupported(in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandSupported(const nsAString & commandID,
                                       bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
 
   // commandID is supported if it can be converted to a Midas command
-  nsCAutoString cmdToDispatch;
+  nsAutoCString cmdToDispatch;
   *_retval = ConvertToMidasInternalCommand(commandID, cmdToDispatch);
 
   return NS_OK;
 }
 
 /* DOMString queryCommandValue(in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandValue(const nsAString & commandID,
                                   nsAString &_retval)
 {
   _retval.SetLength(0);
 
-  nsCAutoString cmdToDispatch, paramStr;
+  nsAutoCString cmdToDispatch, paramStr;
   if (!ConvertToMidasInternalCommand(commandID, cmdToDispatch)) {
     // Return empty string
     return NS_OK;
   }
 
   // if editing is not on, bail
   NS_ENSURE_TRUE(IsEditingOnAfterFlush(), NS_ERROR_FAILURE);
 
--- a/content/media/MediaResource.cpp
+++ b/content/media/MediaResource.cpp
@@ -161,31 +161,31 @@ ChannelMediaResource::OnStartRequest(nsI
       }