From 82dee330c19b423c0cd0a3567080e5c3cfa03151 Mon Sep 17 00:00:00 2001 From: David Major Date: Fri, 10 Mar 2017 15:17:23 +1300 Subject: [PATCH] Bug 1346078: Remove nsAString_internal and just use the nsAString name directly. r=bsmedberg MozReview-Commit-ID: DWDEDMIVKm7 --- build/valgrind/cross-architecture.sup | 6 +++--- dom/media/webrtc/MediaEngineTabVideoSource.cpp | 4 ++-- dom/media/webrtc/MediaEngineTabVideoSource.h | 4 ++-- editor/composer/nsEditorSpellCheck.cpp | 2 +- editor/libeditor/ChangeStyleTransaction.cpp | 2 +- editor/libeditor/EditorBase.cpp | 2 +- editor/libeditor/HTMLEditUtils.cpp | 2 +- editor/libeditor/SelectionState.cpp | 2 +- editor/txtsvc/nsTextServicesDocument.cpp | 2 +- js/src/devtools/rootAnalysis/annotations.js | 3 +-- netwerk/base/nsSocketTransport2.cpp | 4 ++-- netwerk/protocol/http/TunnelUtils.cpp | 4 ++-- python/lldbutils/README.txt | 4 ++-- python/lldbutils/lldbutils/general.py | 4 ++-- security/certverifier/OCSPRequestor.cpp | 2 +- xpcom/base/nscore.h | 12 ------------ 16 files changed, 23 insertions(+), 36 deletions(-) diff --git a/build/valgrind/cross-architecture.sup b/build/valgrind/cross-architecture.sup index 1e9d7ab351e9..c322302afd5c 100644 --- a/build/valgrind/cross-architecture.sup +++ b/build/valgrind/cross-architecture.sup @@ -15,7 +15,7 @@ PR_SetEnv requires its argument to be leaked, but does not appear on stacks. (See bug 793549.) Memcheck:Leak ... - fun:_ZL13SaveWordToEnvPKcRK19nsACString_internal + fun:_ZL13SaveWordToEnvPKcRK10nsACString ... } { @@ -30,8 +30,8 @@ Memcheck:Leak fun:malloc ... - fun:_Z12ToNewCStringRK19nsACString_internal - fun:_ZN13CrashReporter14SetupExtraDataEP7nsIFileRK19nsACString_internal + fun:_Z12ToNewCStringRK10nsACString + fun:_ZN13CrashReporter14SetupExtraDataEP7nsIFileRK10nsACString ... } { diff --git a/dom/media/webrtc/MediaEngineTabVideoSource.cpp b/dom/media/webrtc/MediaEngineTabVideoSource.cpp index 0708d11ee936..908ea8554ac9 100644 --- a/dom/media/webrtc/MediaEngineTabVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineTabVideoSource.cpp @@ -132,13 +132,13 @@ MediaEngineTabVideoSource::DestroyRunnable::Run() } void -MediaEngineTabVideoSource::GetName(nsAString_internal& aName) const +MediaEngineTabVideoSource::GetName(nsAString& aName) const { aName.AssignLiteral(u"&getUserMedia.videoSource.tabShare;"); } void -MediaEngineTabVideoSource::GetUUID(nsACString_internal& aUuid) const +MediaEngineTabVideoSource::GetUUID(nsACString& aUuid) const { aUuid.AssignLiteral("tab"); } diff --git a/dom/media/webrtc/MediaEngineTabVideoSource.h b/dom/media/webrtc/MediaEngineTabVideoSource.h index 7a7b73bc3801..afd65f48c825 100644 --- a/dom/media/webrtc/MediaEngineTabVideoSource.h +++ b/dom/media/webrtc/MediaEngineTabVideoSource.h @@ -19,8 +19,8 @@ class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventList NS_DECL_NSITIMERCALLBACK MediaEngineTabVideoSource(); - void GetName(nsAString_internal&) const override; - void GetUUID(nsACString_internal&) const override; + void GetName(nsAString&) const override; + void GetUUID(nsACString&) const override; bool GetScary() const override { return true; diff --git a/editor/composer/nsEditorSpellCheck.cpp b/editor/composer/nsEditorSpellCheck.cpp index 4d339f7c98a0..ed4a18a37c28 100644 --- a/editor/composer/nsEditorSpellCheck.cpp +++ b/editor/composer/nsEditorSpellCheck.cpp @@ -12,7 +12,7 @@ #include "mozilla/dom/Element.h" // for Element #include "mozilla/dom/Selection.h" #include "mozilla/mozalloc.h" // for operator delete, etc -#include "nsAString.h" // for nsAString_internal::IsEmpty, etc +#include "nsAString.h" // for nsAString::IsEmpty, etc #include "nsComponentManagerUtils.h" // for do_CreateInstance #include "nsDebug.h" // for NS_ENSURE_TRUE, etc #include "nsDependentSubstring.h" // for Substring diff --git a/editor/libeditor/ChangeStyleTransaction.cpp b/editor/libeditor/ChangeStyleTransaction.cpp index 103d9c455f3e..2c078baac584 100644 --- a/editor/libeditor/ChangeStyleTransaction.cpp +++ b/editor/libeditor/ChangeStyleTransaction.cpp @@ -6,7 +6,7 @@ #include "mozilla/ChangeStyleTransaction.h" #include "mozilla/dom/Element.h" // for Element -#include "nsAString.h" // for nsAString_internal::Append, etc. +#include "nsAString.h" // for nsAString::Append, etc. #include "nsCRT.h" // for nsCRT::IsAsciiSpace #include "nsDebug.h" // for NS_ENSURE_SUCCESS, etc. #include "nsError.h" // for NS_ERROR_NULL_POINTER, etc. diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index b5da5b9b800b..008ef15e864e 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -40,7 +40,7 @@ #include "mozilla/dom/Text.h" #include "mozilla/dom/Event.h" #include "mozilla/mozalloc.h" // for operator new, etc. -#include "nsAString.h" // for nsAString_internal::Length, etc. +#include "nsAString.h" // for nsAString::Length, etc. #include "nsCCUncollectableMarker.h" // for nsCCUncollectableMarker #include "nsCaret.h" // for nsCaret #include "nsCaseTreatment.h" diff --git a/editor/libeditor/HTMLEditUtils.cpp b/editor/libeditor/HTMLEditUtils.cpp index 67e5c46e45f0..4fb21d8258db 100644 --- a/editor/libeditor/HTMLEditUtils.cpp +++ b/editor/libeditor/HTMLEditUtils.cpp @@ -10,7 +10,7 @@ #include "mozilla/Assertions.h" // for MOZ_ASSERT, etc. #include "mozilla/EditorBase.h" // for EditorBase #include "mozilla/dom/Element.h" // for Element, nsINode -#include "nsAString.h" // for nsAString_internal::IsEmpty +#include "nsAString.h" // for nsAString::IsEmpty #include "nsCOMPtr.h" // for nsCOMPtr, operator==, etc. #include "nsCaseTreatment.h" #include "nsDebug.h" // for NS_PRECONDITION, etc. diff --git a/editor/libeditor/SelectionState.cpp b/editor/libeditor/SelectionState.cpp index f9ad5947a8cb..700dfdaf7c63 100644 --- a/editor/libeditor/SelectionState.cpp +++ b/editor/libeditor/SelectionState.cpp @@ -8,7 +8,7 @@ #include "mozilla/Assertions.h" // for MOZ_ASSERT, etc. #include "mozilla/EditorUtils.h" // for EditorUtils #include "mozilla/dom/Selection.h" // for Selection -#include "nsAString.h" // for nsAString_internal::Length +#include "nsAString.h" // for nsAString::Length #include "nsCycleCollectionParticipant.h" #include "nsDebug.h" // for NS_ENSURE_TRUE, etc. #include "nsError.h" // for NS_OK, etc. diff --git a/editor/txtsvc/nsTextServicesDocument.cpp b/editor/txtsvc/nsTextServicesDocument.cpp index e0c779683b97..c33370074f88 100644 --- a/editor/txtsvc/nsTextServicesDocument.cpp +++ b/editor/txtsvc/nsTextServicesDocument.cpp @@ -8,7 +8,7 @@ #include "mozilla/Assertions.h" // for MOZ_ASSERT, etc #include "mozilla/dom/Selection.h" #include "mozilla/mozalloc.h" // for operator new, etc -#include "nsAString.h" // for nsAString_internal::Length, etc +#include "nsAString.h" // for nsAString::Length, etc #include "nsContentUtils.h" // for nsContentUtils #include "nsDebug.h" // for NS_ENSURE_TRUE, etc #include "nsDependentSubstring.h" // for Substring diff --git a/js/src/devtools/rootAnalysis/annotations.js b/js/src/devtools/rootAnalysis/annotations.js index 1ca950e9e92b..16e4ebdcd4fa 100644 --- a/js/src/devtools/rootAnalysis/annotations.js +++ b/js/src/devtools/rootAnalysis/annotations.js @@ -196,8 +196,7 @@ var ignoreFunctions = { // The nsScriptNameSpaceManager functions can't actually GC. They // just use a PLDHashTable which has function pointers, which makes the // analysis think maybe they can. - "nsGlobalNameStruct* nsScriptNameSpaceManager::LookupNavigatorName(nsAString_internal*)": true, - "nsGlobalNameStruct* nsScriptNameSpaceManager::LookupName(nsAString_internal*, uint16**)": true, + "nsGlobalNameStruct* nsScriptNameSpaceManager::LookupName(nsAString*, uint16**)": true, // Similar to heap snapshot mock classes, and GTests below. This posts a // synchronous runnable when a GTest fails, and we are pretty sure that the diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp index b20d72cb5baf..62c5ddf2bf32 100644 --- a/netwerk/base/nsSocketTransport2.cpp +++ b/netwerk/base/nsSocketTransport2.cpp @@ -2403,7 +2403,7 @@ nsSocketTransport::GetPort(int32_t *port) } NS_IMETHODIMP -nsSocketTransport::GetNetworkInterfaceId(nsACString_internal &aNetworkInterfaceId) +nsSocketTransport::GetNetworkInterfaceId(nsACString &aNetworkInterfaceId) { MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread, "wrong thread"); aNetworkInterfaceId = mNetworkInterfaceId; @@ -2411,7 +2411,7 @@ nsSocketTransport::GetNetworkInterfaceId(nsACString_internal &aNetworkInterfaceI } NS_IMETHODIMP -nsSocketTransport::SetNetworkInterfaceId(const nsACString_internal &aNetworkInterfaceId) +nsSocketTransport::SetNetworkInterfaceId(const nsACString &aNetworkInterfaceId) { MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread, "wrong thread"); mNetworkInterfaceId = aNetworkInterfaceId; diff --git a/netwerk/protocol/http/TunnelUtils.cpp b/netwerk/protocol/http/TunnelUtils.cpp index cdb3d13d5dfe..dd34164846d9 100644 --- a/netwerk/protocol/http/TunnelUtils.cpp +++ b/netwerk/protocol/http/TunnelUtils.cpp @@ -1591,13 +1591,13 @@ SocketTransportShim::GetTimeout(uint32_t aType, uint32_t *_retval) } NS_IMETHODIMP -SocketTransportShim::GetNetworkInterfaceId(nsACString_internal &aNetworkInterfaceId) +SocketTransportShim::GetNetworkInterfaceId(nsACString &aNetworkInterfaceId) { return mWrapped->GetNetworkInterfaceId(aNetworkInterfaceId); } NS_IMETHODIMP -SocketTransportShim::SetNetworkInterfaceId(const nsACString_internal &aNetworkInterfaceId) +SocketTransportShim::SetNetworkInterfaceId(const nsACString &aNetworkInterfaceId) { return mWrapped->SetNetworkInterfaceId(aNetworkInterfaceId); } diff --git a/python/lldbutils/README.txt b/python/lldbutils/README.txt index a8db723f15c4..cfe3e3696854 100644 --- a/python/lldbutils/README.txt +++ b/python/lldbutils/README.txt @@ -134,13 +134,13 @@ the "expr -R -- EXPR" command can be used to show its actual member variables. (lldb) frame info frame #0: 0x000000010400cfea XUL`nsCSSParser::ParseProperty(this=0x00007fff5fbf5248, aPropID=eCSSProperty_margin_top, aPropValue=0x00007fff5fbf53f8, aSheetURI=0x0000000115ae8c00, aBaseURI=0x0000000115ae8c00, aSheetPrincipal=0x000000010ff9e040, aDeclaration=0x00000001826fd580, aChanged=0x00007fff5fbf5247, aIsImportant=false, aIsSVGMode=false) + 74 at nsCSSParser.cpp:12851 (lldb) p aPropValue - (const nsAString_internal) $16 = u"-25px" + (const nsAString) $16 = u"-25px" (lldb) p this (nsHTMLDocument *) $18 = 0x0000000115b56000 (lldb) p mContentType (nsCString) $19 = { - nsACString_internal = "text/html" + nsACString = "text/html" } * nscolor diff --git a/python/lldbutils/lldbutils/general.py b/python/lldbutils/lldbutils/general.py index 27cf19aabb66..c8cfd27c28f7 100644 --- a/python/lldbutils/lldbutils/general.py +++ b/python/lldbutils/lldbutils/general.py @@ -92,8 +92,8 @@ def callfunc(debugger, command, result, dict): debugger.HandleCommand('print ((void(*)%s)0x%0x)(%s' % (arg_types, sym.addr.GetLoadAddress(target), args)) def init(debugger): - debugger.HandleCommand("type summary add nsAString_internal -F lldbutils.general.summarize_string") - debugger.HandleCommand("type summary add nsACString_internal -F lldbutils.general.summarize_string") + debugger.HandleCommand("type summary add nsAString -F lldbutils.general.summarize_string") + debugger.HandleCommand("type summary add nsACString -F lldbutils.general.summarize_string") debugger.HandleCommand("type summary add nsFixedString -F lldbutils.general.summarize_string") debugger.HandleCommand("type summary add nsFixedCString -F lldbutils.general.summarize_string") debugger.HandleCommand("type summary add nsAutoString -F lldbutils.general.summarize_string") diff --git a/security/certverifier/OCSPRequestor.cpp b/security/certverifier/OCSPRequestor.cpp index 0fe7858d7d23..d0edede6fd72 100644 --- a/security/certverifier/OCSPRequestor.cpp +++ b/security/certverifier/OCSPRequestor.cpp @@ -141,7 +141,7 @@ DoOCSPRequest(const UniquePLArenaPool& arena, const char* url, } nsAutoCString hostname(url + authorityPos + hostnamePos, - static_cast(hostnameLen)); + static_cast(hostnameLen)); nsNSSHttpServerSession* serverSessionPtr = nullptr; Result rv = nsNSSHttpInterface::createSessionFcn( diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index 2830feb5c3af..f40f0d20b12d 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -187,18 +187,6 @@ #define XPCOM_API(type) NS_EXTERN_C type -#ifdef MOZILLA_INTERNAL_API - /* - The frozen string API has different definitions of nsAC?String - classes than the internal API. On systems that explicitly declare - dllexport symbols this is not a problem, but on ELF systems - internal symbols can accidentally "shine through"; we rename the - internal classes to avoid symbol conflicts. - */ -# define nsAString nsAString_internal -# define nsACString nsACString_internal -#endif - #if (defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING)) /* Make refcnt logging part of the build. This doesn't mean that * actual logging will occur (that requires a separate enable; see