зеркало из https://github.com/mozilla/gecko-dev.git
Bug 335953 Make code outside intl use NS_CHARSETALIAS_CONTRACTID instead of NS_CHARSETALIAS_CID
r=bz sr=bz
This commit is contained in:
Родитель
5aa27b6361
Коммит
28fa63a8f5
|
@ -190,7 +190,6 @@ static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CI
|
|||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kPlatformCharsetCID, NS_PLATFORMCHARSET_CID);
|
||||
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
|
||||
static const char kURINC_BookmarksTopRoot[] = "NC:BookmarksTopRoot";
|
||||
static const char kURINC_BookmarksRoot[] = "NC:BookmarksRoot";
|
||||
|
@ -226,7 +225,7 @@ bm_AddRefGlobals()
|
|||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF container utils");
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = CallGetService(kCharsetAliasCID, &gCharsetAlias);
|
||||
rv = CallGetService(NS_CHARSETALIAS_CONTRACTID, &gCharsetAlias);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get charset alias service");
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
|
|
@ -155,7 +155,6 @@ static NS_DEFINE_CID(kDOMEventGroupCID, NS_DOMEVENTGROUP_CID);
|
|||
static PRLogModuleInfo* gDocumentLeakPRLog;
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
void
|
||||
|
@ -1315,7 +1314,7 @@ nsDocument::SetDocumentCharacterSet(const nsACString& aCharSetID)
|
|||
mCharacterSet = aCharSetID;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID));
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(NS_CHARSETALIAS_CONTRACTID));
|
||||
if (calias) {
|
||||
nsCAutoString canonicalName;
|
||||
calias->GetPreferred(aCharSetID, canonicalName);
|
||||
|
@ -1468,7 +1467,7 @@ nsDocument::TryChannelCharset(nsIChannel *aChannel,
|
|||
nsCAutoString charsetVal;
|
||||
nsresult rv = aChannel->GetContentCharset(charsetVal);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID));
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(NS_CHARSETALIAS_CONTRACTID));
|
||||
if (calias) {
|
||||
nsCAutoString preferred;
|
||||
rv = calias->GetPreferred(charsetVal,
|
||||
|
|
|
@ -88,7 +88,6 @@ static const char* kLoadAsData = "loadAsData";
|
|||
#define READYSTATE_STR "readystatechange"
|
||||
|
||||
// CIDs
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
static NS_DEFINE_CID(kIDOMDOMImplementationCID, NS_DOM_IMPLEMENTATION_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
@ -535,7 +534,7 @@ nsXMLHttpRequest::DetectCharset(nsACString& aCharset)
|
|||
|
||||
rv = channel->GetContentCharset(charsetVal);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID,&rv));
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(NS_CHARSETALIAS_CONTRACTID,&rv));
|
||||
if(NS_SUCCEEDED(rv) && calias) {
|
||||
rv = calias->GetPreferred(charsetVal, aCharset);
|
||||
}
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
//end
|
||||
|
||||
static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID);
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
|
||||
/**
|
||||
* Helper superclass implementation of nsIFormSubmission, providing common
|
||||
|
@ -1248,7 +1247,7 @@ nsFormSubmission::GetSubmitCharset(nsGenericHTMLElement* aForm,
|
|||
PRInt32 offset=0;
|
||||
PRInt32 spPos=0;
|
||||
// get charset from charsets one by one
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID, &rv));
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(NS_CHARSETALIAS_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -155,7 +155,6 @@ const PRInt32 kBackward = 1;
|
|||
|
||||
static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
|
||||
// Returns the name atom of aContent, if the content is a named item
|
||||
// and has a name atom.
|
||||
|
|
|
@ -97,7 +97,6 @@
|
|||
static const char kLoadAsData[] = "loadAsData";
|
||||
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
|
||||
|
||||
// ==================================================================
|
||||
|
|
|
@ -50,8 +50,6 @@
|
|||
#include "nsCRT.h"
|
||||
#include "nsParser.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
|
||||
nsReadEndCondition::nsReadEndCondition(const PRUnichar* aTerminateChars) :
|
||||
mChars(aTerminateChars), mFilter(PRUnichar(~0)) // All bits set
|
||||
{
|
||||
|
@ -196,7 +194,7 @@ nsresult nsScanner::SetDocumentCharset(const nsACString& aCharset , PRInt32 aSou
|
|||
if( aSource < mCharsetSource) // priority is lower the the current one , just
|
||||
return res;
|
||||
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID, &res));
|
||||
nsCOMPtr<nsICharsetAlias> calias(do_GetService(NS_CHARSETALIAS_CONTRACTID, &res));
|
||||
NS_ASSERTION( nsnull != calias, "cannot find charset alias");
|
||||
if( NS_SUCCEEDED(res) && (nsnull != calias))
|
||||
{
|
||||
|
|
|
@ -167,7 +167,6 @@ static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CI
|
|||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kPlatformCharsetCID, NS_PLATFORMCHARSET_CID);
|
||||
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
#define URINC_BOOKMARKS_TOPROOT_STRING "NC:BookmarksTopRoot"
|
||||
|
@ -211,7 +210,7 @@ bm_AddRefGlobals()
|
|||
return rv;
|
||||
}
|
||||
|
||||
rv = CallGetService(kCharsetAliasCID, &gCharsetAlias);
|
||||
rv = CallGetService(NS_CHARSETALIAS_CONTRACTID, &gCharsetAlias);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("unable to get charset alias service");
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче