Bug 74803 - Should make global data const where possible; const changes for nsmodulecomponentinfo; r=dbaron
--- a/embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp
+++ b/embedding/browser/photon/src/nsUnknownContentTypeHandler.cpp
@@ -199,17 +199,17 @@ NS_IMETHODIMP className::QueryInterface(
else rv = NS_NOINTERFACE;
}
return rv;
}
NS_GENERIC_FACTORY_CONSTRUCTOR( nsUnknownContentTypeHandler )
// The list of components we register
-static nsModuleComponentInfo info[] = {
+static const nsModuleComponentInfo info[] = {
{
"nsUnknownContentTypeHandler",
NS_IHELPERAPPLAUNCHERDIALOG_IID,
NS_IHELPERAPPLAUNCHERDLG_CONTRACTID,
nsUnknownContentTypeHandlerConstructor
}
};
--- a/extensions/auth/nsAuthFactory.cpp
+++ b/extensions/auth/nsAuthFactory.cpp
@@ -204,17 +204,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthSSP
{0x93, 0x4b, 0x14, 0x8e, 0x33, 0xc2, 0x28, 0xa6} \
}
#include "nsAuthSASL.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthSASL)
//-----------------------------------------------------------------------------
-static nsModuleComponentInfo components[] = {
+static const nsModuleComponentInfo components[] = {
{ "nsAuthKerbGSS",
NS_GSSAUTH_CID,
NS_AUTH_MODULE_CONTRACTID_PREFIX "kerb-gss",
nsKerbGSSAPIAuthConstructor
},
{ "nsAuthNegoGSSAPI",
NS_NEGOTIATEAUTH_CID,
NS_AUTH_MODULE_CONTRACTID_PREFIX "negotiate-gss",
--- a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
+++ b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
@@ -112,17 +112,17 @@ mozInlineSpellCheckerConstructor(nsISupp
return rv;
}
////////////////////////////////////////////////////////////////////////
// Define a table of CIDs implemented by this module along with other
// information like the function to create an instance, contractid, and
// class name.
//
-static nsModuleComponentInfo components[] = {
+static const nsModuleComponentInfo components[] = {
#ifdef MOZ_MACBROWSER
{
"OSX Spell check service",
MOZ_OSXSPELL_CID,
MOZ_OSXSPELL_CONTRACTID,
mozOSXSpellConstructor
},
#else
--- a/intl/build/nsI18nModule.cpp
+++ b/intl/build/nsI18nModule.cpp
@@ -51,17 +51,17 @@
#include "nsStrBundleConstructors.h"
// locale
#include "nsLocaleConstructors.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSemanticUnitScanner)
-static nsModuleComponentInfo components[] =
+static const nsModuleComponentInfo components[] =
{
// lwbrk
{ "Line Breaker", NS_LBRK_CID,
NS_LBRK_CONTRACTID, nsJISx4051LineBreakerConstructor},
{ "Word Breaker", NS_WBRK_CID,
NS_WBRK_CONTRACTID, nsSampleWordBreakerConstructor},
{ "Semantic Unit Scanner", NS_SEMANTICUNITSCANNER_CID,
NS_SEMANTICUNITSCANNER_CONTRACTID, nsSemanticUnitScannerConstructor},
--- a/intl/chardet/src/nsChardetModule.cpp
+++ b/intl/chardet/src/nsChardetModule.cpp
@@ -122,17 +122,17 @@ nsUKProbDetectorRegistrationProc(nsIComp
const nsModuleComponentInfo *info)
{
return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
"ukprob",
info->mContractID);
}
-static nsModuleComponentInfo components[] =
+static const nsModuleComponentInfo components[] =
{
{ "Meta Charset", NS_META_CHARSET_CID,
NS_META_CHARSET_CONTRACTID, nsMetaCharsetObserverConstructor,
nsMetaCharsetObserverRegistrationProc, nsMetaCharsetObserverUnegistrationProc,
NULL},
{ "Document Charset Info", NS_DOCUMENTCHARSETINFO_CID,
NS_DOCUMENTCHARSETINFO_CONTRACTID, nsDocumentCharsetInfoConstructor,
NULL, NULL},
--- a/modules/libjar/zipwriter/src/ZipWriterModule.cpp
+++ b/modules/libjar/zipwriter/src/ZipWriterModule.cpp
@@ -38,17 +38,17 @@
#include "nsIGenericFactory.h"
#include "nsDeflateConverter.h"
#include "nsZipWriter.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeflateConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZipWriter)
-static nsModuleComponentInfo components[] =
+static const nsModuleComponentInfo components[] =
{
{
DEFLATECONVERTER_CLASSNAME,
DEFLATECONVERTER_CID,
"@mozilla.org/streamconv;1?from=uncompressed&to=deflate",
nsDeflateConverterConstructor,
},
{
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1005,17 +1005,17 @@ ScopedXPCOMStartup::~ScopedXPCOMStartup(
mServiceManager = nsnull;
}
}
// {95d89e3e-a169-41a3-8e56-719978e15b12}
#define APPINFO_CID \
{ 0x95d89e3e, 0xa169, 0x41a3, { 0x8e, 0x56, 0x71, 0x99, 0x78, 0xe1, 0x5b, 0x12 } }
-static nsModuleComponentInfo kComponents[] =
+static const nsModuleComponentInfo kComponents[] =
{
{
"nsXULAppInfo",
APPINFO_CID,
XULAPPINFO_SERVICE_CONTRACTID,
AppInfoConstructor
},
{
--- a/widget/src/photon/nsWidgetFactory.cpp
+++ b/widget/src/photon/nsWidgetFactory.cpp
@@ -74,17 +74,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragSer
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
#ifdef IBMBIDI
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
#endif
-static nsModuleComponentInfo components[] =
+static const nsModuleComponentInfo components[] =
{
{ "Ph nsWindow",
NS_WINDOW_CID,
"@mozilla.org/widgets/window/ph;1",
nsWindowConstructor },
{ "Ph Child nsWindow",
NS_CHILD_CID,
"@mozilla.org/widgets/child_window/ph;1",