diff --git a/mozilla/embedding/base/Makefile.in b/mozilla/embedding/base/Makefile.in
index 6f3fa52100a..0295b491010 100644
--- a/mozilla/embedding/base/Makefile.in
+++ b/mozilla/embedding/base/Makefile.in
@@ -49,7 +49,6 @@ XPIDLSRCS = nsIWindowCreator.idl \
$(NULL)
CPPSRCS = \
- nsSetupRegistry.cpp \
nsEmbedAPI.cpp \
$(NULL)
diff --git a/mozilla/embedding/base/macbuild/EmbedAPI.xml b/mozilla/embedding/base/macbuild/EmbedAPI.xml
index 6fe21e1d2ab..7b402e711ae 100644
--- a/mozilla/embedding/base/macbuild/EmbedAPI.xml
+++ b/mozilla/embedding/base/macbuild/EmbedAPI.xml
@@ -924,13 +924,6 @@
Text
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
-
-
@@ -938,11 +931,6 @@
nsEmbedAPI.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
@@ -1816,13 +1804,6 @@
Text
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
-
-
@@ -1830,11 +1811,6 @@
nsEmbedAPI.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
@@ -1852,12 +1828,6 @@
nsEmbedAPI.cpp
MacOS
-
- EmbedAPIDebug.o
- Name
- nsSetupRegistry.cpp
- MacOS
-
diff --git a/mozilla/embedding/base/makefile.win b/mozilla/embedding/base/makefile.win
index 592854cdcf1..7d11caafb2b 100644
--- a/mozilla/embedding/base/makefile.win
+++ b/mozilla/embedding/base/makefile.win
@@ -48,7 +48,6 @@ XPIDLSRCS = \
CPP_OBJS= \
.\$(OBJDIR)\nsEmbedAPI.obj \
.\$(OBJDIR)\nsEmbedWin32.obj \
- .\$(OBJDIR)\nsSetupRegistry.obj \
$(NULL)
include <$(DEPTH)\config\rules.mak>
diff --git a/mozilla/embedding/base/nsEmbedAPI.cpp b/mozilla/embedding/base/nsEmbedAPI.cpp
index 0f1c89a99c0..d1c128ef887 100644
--- a/mozilla/embedding/base/nsEmbedAPI.cpp
+++ b/mozilla/embedding/base/nsEmbedAPI.cpp
@@ -65,8 +65,6 @@ static PRBool sXPCOMInitializedFlag = PR_FALSE;
static XPCOMCleanupHack sXPCOMCleanupHack;
#endif
-extern "C" void NS_SetupRegistry();
-
nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
nsIDirectoryServiceProvider *appFileLocProvider)
@@ -108,9 +106,6 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
// Register components
if (!sRegistryInitializedFlag)
{
- // XXX hack method
- NS_SetupRegistry();
-
rv = nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
NULL /* default */);
if (NS_FAILED(rv))
diff --git a/mozilla/embedding/base/nsSetupRegistry.cpp b/mozilla/embedding/base/nsSetupRegistry.cpp
deleted file mode 100644
index bea9ca4a304..00000000000
--- a/mozilla/embedding/base/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * This evil file will go away when the XPCOM registry can be
- * externally initialized!
- *
- * Until then, include the real file to keep everything in sync.
- */
-#include "../../xpfe/bootstrap/nsSetupRegistry.cpp"
diff --git a/mozilla/embedding/browser/activex/src/control/makefile.win b/mozilla/embedding/browser/activex/src/control/makefile.win
index 30ff7537088..b72dcb2f12b 100644
--- a/mozilla/embedding/browser/activex/src/control/makefile.win
+++ b/mozilla/embedding/browser/activex/src/control/makefile.win
@@ -86,6 +86,8 @@ OBJS = \
$(NULL)
# most of these have to be here for nsSetupRegistry.cpp...
+# ... and since nsSetupRegistry.cpp is no longer used, many could now be
+# removed.
LLIBS= \
$(DIST)\lib\xpcom.lib \
diff --git a/mozilla/embedding/browser/activex/src/control/nsSetupRegistry.cpp b/mozilla/embedding/browser/activex/src/control/nsSetupRegistry.cpp
deleted file mode 100644
index 008e9ecf394..00000000000
--- a/mozilla/embedding/browser/activex/src/control/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * This evil file will go away when the XPCOM registry can be
- * externally initialized!
- *
- * Until then, include the real file to keep everything in sync.
- */
-#include "..\..\..\xpfe\bootstrap\nsSetupRegistry.cpp"
diff --git a/mozilla/embedding/browser/gtk/src/nsSetupRegistry.cpp b/mozilla/embedding/browser/gtk/src/nsSetupRegistry.cpp
deleted file mode 100644
index 172cc26dfea..00000000000
--- a/mozilla/embedding/browser/gtk/src/nsSetupRegistry.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../../../webshell/tests/viewer/nsSetupRegistry.cpp"
diff --git a/mozilla/htmlparser/tests/outsinks/Convert.cpp b/mozilla/htmlparser/tests/outsinks/Convert.cpp
index 98c388692af..d4f18264664 100644
--- a/mozilla/htmlparser/tests/outsinks/Convert.cpp
+++ b/mozilla/htmlparser/tests/outsinks/Convert.cpp
@@ -22,6 +22,7 @@
#include // for isdigit()
+#include "nsXPCOM.h"
#include "nsParserCIID.h"
#include "nsIParser.h"
#include "nsIHTMLContentSink.h"
@@ -31,17 +32,6 @@
#include "nsIComponentManager.h"
#include "nsReadableUtils.h"
-extern "C" void NS_SetupRegistry();
-
-#ifdef XP_PC
-#define PARSER_DLL "gkparser.dll"
-#endif
-#ifdef XP_MAC
-#endif
-#if defined(XP_UNIX) || defined(XP_BEOS)
-#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
-#endif
-
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
@@ -298,8 +288,8 @@ Usage: %s [-i intype] [-o outtype] [-f flags] [-w wrapcol] [-c comparison_file]
}
else file = stdin;
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, 0);
- NS_SetupRegistry();
// Read in the string: very inefficient, but who cares?
nsString inString;
diff --git a/mozilla/htmlparser/tests/outsinks/Makefile.in b/mozilla/htmlparser/tests/outsinks/Makefile.in
index 82c517ffdb9..98519f79033 100644
--- a/mozilla/htmlparser/tests/outsinks/Makefile.in
+++ b/mozilla/htmlparser/tests/outsinks/Makefile.in
@@ -38,7 +38,6 @@ REQUIRES = xpcom \
CPPSRCS = \
Convert.cpp \
- nsSetupRegistry.cpp \
$(NULL)
LIBS = \
diff --git a/mozilla/htmlparser/tests/outsinks/makefile.win b/mozilla/htmlparser/tests/outsinks/makefile.win
index 0d39c39f1ff..6649b6a6424 100644
--- a/mozilla/htmlparser/tests/outsinks/makefile.win
+++ b/mozilla/htmlparser/tests/outsinks/makefile.win
@@ -36,7 +36,6 @@ BATCHSCRIPT = TestOutSinks.pl
OBJS = \
.\$(OBJDIR)\Convert.obj \
- .\$(OBJDIR)\nsSetupRegistry.obj \
$(NULL)
TEST_FILES = \
diff --git a/mozilla/htmlparser/tests/outsinks/nsSetupRegistry.cpp b/mozilla/htmlparser/tests/outsinks/nsSetupRegistry.cpp
deleted file mode 100644
index 68bedc02736..00000000000
--- a/mozilla/htmlparser/tests/outsinks/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-1999 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- */
-
-#define NS_IMPL_IDS
-
-#include "nsParserCIID.h"
-#include "nsDOMCID.h"
-
-#ifdef XP_PC
- #define PARSER_DLL "gkparser.dll"
- #define DOM_DLL "jsdom.dll"
-
-#elif defined(XP_MAC)
- #define PARSER_DLL "PARSER_DLL"
- #define DOM_DLL "DOM_DLL"
-
-#else /* XP_UNIX etc. */
- #define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
- #define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
-#endif
-
-// Class ID's
-// PARSER
-static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
-static NS_DEFINE_CID(kCWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
-static NS_DEFINE_CID(kCNavDTDCID, NS_CNAVDTD_CID);
-
-// DOM
-static NS_DEFINE_IID(kCDOMScriptObjectFactory, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
-static NS_DEFINE_IID(kCScriptNameSetRegistry, NS_SCRIPT_NAMESET_REGISTRY_CID);
-
-
-extern "C" void
-NS_SetupRegistry()
-{
- nsComponentManager::RegisterComponentLib(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCNavDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
-
- // DOM
- nsComponentManager::RegisterComponentLib(kCDOMScriptObjectFactory, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCScriptNameSetRegistry, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
-}
-
diff --git a/mozilla/intl/compatibility/tests/TestI18nCompatibility.cpp b/mozilla/intl/compatibility/tests/TestI18nCompatibility.cpp
index 41a17f1fcf6..6b7459fa18c 100644
--- a/mozilla/intl/compatibility/tests/TestI18nCompatibility.cpp
+++ b/mozilla/intl/compatibility/tests/TestI18nCompatibility.cpp
@@ -37,6 +37,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include
+#include "nsXPCOM.h"
#include "nsIComponentManager.h"
#include "nsISupports.h"
#include "nsIServiceManager.h"
@@ -44,35 +45,15 @@
#include "nsReadableUtils.h"
#include "nsII18nCompatibility.h"
-
static NS_DEFINE_CID(kI18nCompatibilityCID, NS_I18NCOMPATIBILITY_CID);
-#ifdef XP_PC
-#define DLL_NAME "intlcmpt.dll"
-#else
-#ifdef XP_MAC
-#define DLL_NAME "INTLCMPT_DLL"
-#else
-#endif
-#define DLL_NAME "intlcmpt"MOZ_DLL_SUFFIX
-#endif
-
-extern "C" void NS_SetupRegistry()
-{
- nsComponentManager::RegisterComponent(kI18nCompatibilityCID, NULL, NULL, DLL_NAME, PR_FALSE, PR_FALSE);
-}
-
-#undef DLL_NAME
-
-
int main(int argc, char** argv) {
nsresult rv;
- NS_SetupRegistry();
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
- nsCOMPtr I18nCompatibility;
- rv = nsComponentManager::CreateInstance(kI18nCompatibilityCID, NULL,
- NS_GET_IID(nsII18nCompatibility), getter_AddRefs(I18nCompatibility));
+ nsCOMPtr I18nCompatibility =
+ do_CreateInstance(kI18nCompatibilityCID, &rv);
if (NS_SUCCEEDED(rv)) {
PRUint16 csid = 0;
PRUnichar *charsetUni = NULL;
diff --git a/mozilla/intl/lwbrk/tests/TestLineBreak.cpp b/mozilla/intl/lwbrk/tests/TestLineBreak.cpp
index 0923224666c..bf50549ee93 100644
--- a/mozilla/intl/lwbrk/tests/TestLineBreak.cpp
+++ b/mozilla/intl/lwbrk/tests/TestLineBreak.cpp
@@ -36,6 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include
+#include "nsXPCOM.h"
#include "nsIComponentManager.h"
#include "nsISupports.h"
#include "nsIServiceManager.h"
@@ -386,21 +387,6 @@ PRBool TestWordBreaker()
return ok;
}
-#ifdef XP_PC
-#define LWBRK_DLL "lwbrk.dll"
-#else
-#ifdef XP_MAC
-#define LWBRK_DLL "LWBRK_DLL"
-#else
-#endif
-#define LWBRK_DLL "liblwbrk"MOZ_DLL_SUFFIX
-#endif
-
-extern "C" void NS_SetupRegistry()
-{
- nsComponentManager::RegisterComponent(kLWBrkCID, NULL, NULL, LWBRK_DLL, PR_FALSE, PR_FALSE);
-}
-
void SamplePrintWordWithBreak();
void SampleFindWordBreakFromPosition(PRUint32 fragN, PRUint32 offset);
// Sample Code
@@ -581,9 +567,9 @@ void SampleFindWordBreakFromPosition(PRUint32 fragN, PRUint32 offset)
// Main
int main(int argc, char** argv) {
-
- NS_SetupRegistry();
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
+
// --------------------------------------------
cout << "Test Line Break\n";
diff --git a/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp b/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp
index 98c388692af..d4f18264664 100644
--- a/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp
+++ b/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp
@@ -22,6 +22,7 @@
#include // for isdigit()
+#include "nsXPCOM.h"
#include "nsParserCIID.h"
#include "nsIParser.h"
#include "nsIHTMLContentSink.h"
@@ -31,17 +32,6 @@
#include "nsIComponentManager.h"
#include "nsReadableUtils.h"
-extern "C" void NS_SetupRegistry();
-
-#ifdef XP_PC
-#define PARSER_DLL "gkparser.dll"
-#endif
-#ifdef XP_MAC
-#endif
-#if defined(XP_UNIX) || defined(XP_BEOS)
-#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
-#endif
-
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
@@ -298,8 +288,8 @@ Usage: %s [-i intype] [-o outtype] [-f flags] [-w wrapcol] [-c comparison_file]
}
else file = stdin;
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, 0);
- NS_SetupRegistry();
// Read in the string: very inefficient, but who cares?
nsString inString;
diff --git a/mozilla/parser/htmlparser/tests/outsinks/Makefile.in b/mozilla/parser/htmlparser/tests/outsinks/Makefile.in
index 82c517ffdb9..98519f79033 100644
--- a/mozilla/parser/htmlparser/tests/outsinks/Makefile.in
+++ b/mozilla/parser/htmlparser/tests/outsinks/Makefile.in
@@ -38,7 +38,6 @@ REQUIRES = xpcom \
CPPSRCS = \
Convert.cpp \
- nsSetupRegistry.cpp \
$(NULL)
LIBS = \
diff --git a/mozilla/parser/htmlparser/tests/outsinks/makefile.win b/mozilla/parser/htmlparser/tests/outsinks/makefile.win
index 0d39c39f1ff..6649b6a6424 100644
--- a/mozilla/parser/htmlparser/tests/outsinks/makefile.win
+++ b/mozilla/parser/htmlparser/tests/outsinks/makefile.win
@@ -36,7 +36,6 @@ BATCHSCRIPT = TestOutSinks.pl
OBJS = \
.\$(OBJDIR)\Convert.obj \
- .\$(OBJDIR)\nsSetupRegistry.obj \
$(NULL)
TEST_FILES = \
diff --git a/mozilla/parser/htmlparser/tests/outsinks/nsSetupRegistry.cpp b/mozilla/parser/htmlparser/tests/outsinks/nsSetupRegistry.cpp
deleted file mode 100644
index 68bedc02736..00000000000
--- a/mozilla/parser/htmlparser/tests/outsinks/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-1999 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- */
-
-#define NS_IMPL_IDS
-
-#include "nsParserCIID.h"
-#include "nsDOMCID.h"
-
-#ifdef XP_PC
- #define PARSER_DLL "gkparser.dll"
- #define DOM_DLL "jsdom.dll"
-
-#elif defined(XP_MAC)
- #define PARSER_DLL "PARSER_DLL"
- #define DOM_DLL "DOM_DLL"
-
-#else /* XP_UNIX etc. */
- #define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
- #define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
-#endif
-
-// Class ID's
-// PARSER
-static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
-static NS_DEFINE_CID(kCWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
-static NS_DEFINE_CID(kCNavDTDCID, NS_CNAVDTD_CID);
-
-// DOM
-static NS_DEFINE_IID(kCDOMScriptObjectFactory, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
-static NS_DEFINE_IID(kCScriptNameSetRegistry, NS_SCRIPT_NAMESET_REGISTRY_CID);
-
-
-extern "C" void
-NS_SetupRegistry()
-{
- nsComponentManager::RegisterComponentLib(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCNavDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
-
- // DOM
- nsComponentManager::RegisterComponentLib(kCDOMScriptObjectFactory, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCScriptNameSetRegistry, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
-}
-
diff --git a/mozilla/rdf/tests/rdfcat/rdfcat.cpp b/mozilla/rdf/tests/rdfcat/rdfcat.cpp
index d4025c4bd3e..a3196dc8eb8 100644
--- a/mozilla/rdf/tests/rdfcat/rdfcat.cpp
+++ b/mozilla/rdf/tests/rdfcat/rdfcat.cpp
@@ -79,11 +79,6 @@ static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID);
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID);
-////////////////////////////////////////////////////////////////////////
-// To get the registry initialized!
-
-#include "../../../webshell/tests/viewer/nsSetupRegistry.cpp"
-
////////////////////////////////////////////////////////////////////////
class ConsoleOutputStreamImpl : public nsIOutputStream
@@ -164,7 +159,7 @@ main(int argc, char** argv)
return 1;
}
- NS_SetupRegistry();
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
// Get netlib off the floor...
nsCOMPtr theEventQueueService =
diff --git a/mozilla/webshell/embed/xlib/gtk/Makefile.in b/mozilla/webshell/embed/xlib/gtk/Makefile.in
index 44676e2123d..d878ed6ee2f 100644
--- a/mozilla/webshell/embed/xlib/gtk/Makefile.in
+++ b/mozilla/webshell/embed/xlib/gtk/Makefile.in
@@ -30,7 +30,6 @@ PROGRAM = embed_xlib_into_gtk
CPPSRCS = \
nsEmbedXlibIntoGtk.cpp \
- nsSetupRegistry.cpp \
$(NULL)
LIBS = \
diff --git a/mozilla/webshell/embed/xlib/gtk/nsEmbedXlibIntoGtk.cpp b/mozilla/webshell/embed/xlib/gtk/nsEmbedXlibIntoGtk.cpp
index be4aaaa659a..2b8ed066198 100644
--- a/mozilla/webshell/embed/xlib/gtk/nsEmbedXlibIntoGtk.cpp
+++ b/mozilla/webshell/embed/xlib/gtk/nsEmbedXlibIntoGtk.cpp
@@ -43,6 +43,7 @@ extern "C" {
#include
}
+#include "nsXPCOM.h"
#include "nsIServiceManager.h"
#include "nsReadableUtils.h"
#include "nsIEventQueueService.h"
@@ -68,8 +69,6 @@ static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
static NS_DEFINE_CID(kCUnixToolkitServiceCID, NS_UNIX_TOOLKIT_SERVICE_CID);
-extern "C" void NS_SetupRegistry();
-
static GdkFilterReturn test_filter (GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data);
@@ -129,14 +128,11 @@ int main(int argc, char **argv)
gtk_widget_realize(main_window);
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
+
+
//////////////////////////////////////////////////////////////////////
- //
// Toolkit Service setup
- //
- // Note: This must happend before NS_SetupRegistry() is called so
- // that the toolkit specific xpcom components can be registered
- // as needed.
- //
//////////////////////////////////////////////////////////////////////
nsIUnixToolkitService * unixToolkitService = nsnull;
@@ -160,13 +156,6 @@ int main(int argc, char **argv)
//////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////
- //
- // Setup the registry
- //
- //////////////////////////////////////////////////////////////////////
- NS_SetupRegistry();
-
printf("Creating event queue.\n");
nsIEventQueueService * eventQueueService = nsnull;
diff --git a/mozilla/webshell/embed/xlib/gtk/nsSetupRegistry.cpp b/mozilla/webshell/embed/xlib/gtk/nsSetupRegistry.cpp
deleted file mode 100644
index ea0aa79f7ce..00000000000
--- a/mozilla/webshell/embed/xlib/gtk/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "../../../../webshell/tests/viewer/nsSetupRegistry.cpp"
-
diff --git a/mozilla/webshell/embed/xlib/qt/Makefile.in b/mozilla/webshell/embed/xlib/qt/Makefile.in
index 3840f1d54ac..714f1aef014 100644
--- a/mozilla/webshell/embed/xlib/qt/Makefile.in
+++ b/mozilla/webshell/embed/xlib/qt/Makefile.in
@@ -40,7 +40,6 @@ CPPSRCS = \
QMozillaContainer.cpp \
nsEmbedXlibIntoQt.cpp \
nsQtEventProcessor.cpp \
- nsSetupRegistry.cpp \
$(NULL)
LIBS = \
diff --git a/mozilla/webshell/embed/xlib/qt/QMozillaContainer.cpp b/mozilla/webshell/embed/xlib/qt/QMozillaContainer.cpp
index f7debd29b21..cd56ab24ce3 100644
--- a/mozilla/webshell/embed/xlib/qt/QMozillaContainer.cpp
+++ b/mozilla/webshell/embed/xlib/qt/QMozillaContainer.cpp
@@ -48,13 +48,6 @@ static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
-
-
-
-//-----------------------------------------------------------------------------
-extern "C" void NS_SetupRegistry();
-
-
// XXX ----------------------------------------------------------------
// XXX
// XXX QMozillaWidget is used to bind the windows created by Mozilla
@@ -236,13 +229,7 @@ int QMozillaContainer::init()
xlib_rgb_init( qt_xdisplay(), DefaultScreenOfDisplay( qt_xdisplay() ) );
//////////////////////////////////////////////////////////////////////
- //
// Toolkit Service setup
- //
- // Note: This must happend before NS_SetupRegistry() is called so
- // that the toolkit specific xpcom components can be registered
- // as needed.
- //
//////////////////////////////////////////////////////////////////////
nsresult rv;
@@ -268,13 +255,6 @@ int QMozillaContainer::init()
//////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////
- //
- // Setup the registry
- //
- //////////////////////////////////////////////////////////////////////
- NS_SetupRegistry();
-
printf("Creating event queue.\n");
nsIEventQueueService * eventQueueService = nsnull;
diff --git a/mozilla/webshell/embed/xlib/qt/nsSetupRegistry.cpp b/mozilla/webshell/embed/xlib/qt/nsSetupRegistry.cpp
deleted file mode 100644
index 0cae5f73f0b..00000000000
--- a/mozilla/webshell/embed/xlib/qt/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are Copyright (C) 1998
- * Netscape Communications Corporation. All Rights Reserved.
- *
- * Contributor(s):
- * Milind Changire
- */
-
-#include "../../../../webshell/tests/viewer/nsSetupRegistry.cpp"
-
diff --git a/mozilla/webshell/src/Makefile.in b/mozilla/webshell/src/Makefile.in
deleted file mode 100644
index 091f11261ad..00000000000
--- a/mozilla/webshell/src/Makefile.in
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-
-DEPTH = ../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE = webshell
-LIBRARY_NAME = webshell
-EXPORT_LIBRARY = 1
-SHORT_LIBNAME = gkweb
-EXTRA_DSO_LIBS = jsdom docshell
-ifdef MOZ_PERF_METRICS
-EXTRA_DSO_LIBS += mozutil_s
-endif
-DEFFILE = $(srcdir)/webshell.def
-
-ifeq ($(OS_ARCH),Darwin)
-IS_COMPONENT = 1
-endif
-
-CPPSRCS = \
- dlldeps.cpp \
- nsDLLFactory.cpp \
- nsWebShell.cpp \
- $(NULL)
-
-EXTRA_DSO_LDOPTS = \
- $(LIBS_DIR) \
- $(EXTRA_DSO_LIBS) \
- $(MOZ_JS_LIBS) \
- $(MOZ_COMPONENT_LIBS) \
- $(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-DEFINES += -D_IMPL_NS_WEB
-ifeq ($(OS_ARCH),WINNT)
-DEFINES += -DWIN32_LEAN_AND_MEAN
-OS_LIBS += ole32.lib
-endif
-LOCAL_INCLUDES = \
- -I$(topsrcdir)/docshell/base \
- $(NULL)
-
diff --git a/mozilla/webshell/src/dlldeps.cpp b/mozilla/webshell/src/dlldeps.cpp
deleted file mode 100644
index 506e7d23da8..00000000000
--- a/mozilla/webshell/src/dlldeps.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is the Mozilla browser.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications, Inc. Portions created by Netscape are
- * Copyright (C) 1999, Mozilla. All Rights Reserved.
- *
- * Contributor(s):
- * Scott Collins
- */
-
-#include "nsIWebShell.h"
-
-void
-XXXNeverCalled()
- {
- }
diff --git a/mozilla/webshell/src/makefile.win b/mozilla/webshell/src/makefile.win
deleted file mode 100644
index 1eb390eee12..00000000000
--- a/mozilla/webshell/src/makefile.win
+++ /dev/null
@@ -1,85 +0,0 @@
-#!nmake
-#
-# The contents of this file are subject to the Netscape Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/NPL/
-#
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-
-DEPTH=..\..
-include <$(DEPTH)/config/config.mak>
-
-
-DEFINES=-D_IMPL_NS_WEB -DWIN32_LEAN_AND_MEAN
-MODULE=raptor
-
-CPP_OBJS= \
- .\$(OBJDIR)\dlldeps.obj \
- .\$(OBJDIR)\nsComFactory.obj \
- .\$(OBJDIR)\nsDLLFactory.obj \
- .\$(OBJDIR)\nsWebShell.obj \
- $(NULL)
-
-LINCS=-I..\public -I..\..\docshell\base
-
-!ifdef MOZ_STATIC_COMPONENT_LIBS
-MAKE_OBJ_TYPE = LIB
-LIBRARY_NAME = gkweb
-LIB=.\$(OBJDIR)\$(LIBRARY_NAME).lib
-!else
-MAKE_OBJ_TYPE = DLL
-DLLNAME = gkweb
-DLL=.\$(OBJDIR)\$(DLLNAME).dll
-!endif
-
-DEFFILE=webshell.def
-
-LCFLAGS = \
- $(LCFLAGS) \
- $(DEFINES) \
- $(NULL)
-
-# These are the libraries we need to link with to create the dll
-LLIBS= \
- $(DIST)\lib\basedocshell_s.lib \
- $(DIST)\lib\xpcom.lib \
- $(DIST)\lib\gkgfx.lib \
- $(DIST)\lib\img32$(VERSION_NUMBER).lib \
- $(DIST)\lib\util.lib \
- $(DIST)\lib\jsdom.lib \
- $(LIBNSPR)
-
-WIN_LIBS= OLE32.LIB
-
-include <$(DEPTH)\config\rules.mak>
-
-!ifdef MOZ_STATIC_COMPONENT_LIBS
-libs:: $(LIB)
- $(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\bin
- $(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
-
-clobber::
- rm -f $(DIST)\bin\$(LIBRARY_NAME).lib
- rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
-!else
-libs:: $(DLL)
- $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
- $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
-
-clobber::
- rm -f $(DIST)\bin\$(DLLNAME).dll
- rm -f $(DIST)\lib\$(DLLNAME).lib
-!endif
\ No newline at end of file
diff --git a/mozilla/webshell/src/nsComFactory.cpp b/mozilla/webshell/src/nsComFactory.cpp
deleted file mode 100644
index 64faa81367d..00000000000
--- a/mozilla/webshell/src/nsComFactory.cpp
+++ /dev/null
@@ -1,402 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifdef XP_PC
-
-//
-// This is a terrible hack which *must* go away soon!!!
-// We need some other mechanism to prime the nsComponentManager...
-//
-#include "../tests/viewer/nsSetupRegistry.cpp"
-
-
-#include
-#include
-
-#include "plstr.h"
-#include "prmem.h"
-#include "prprf.h"
-#include "prlink.h"
-#include "nsIFactory.h"
-#include "nsIWebShell.h"
-#include "nsString.h"
-#include "nsReadableUtils.h"
-#include "plevent.h"
-#include "prthread.h"
-#include "private/pprthred.h"
-#include "nsIServiceManager.h"
-#include "nsIEventQueueService.h"
-
-static HMODULE g_DllInst = NULL;
-
-#define GUID_SIZE 128
-
-//
-// Windows Registry keys and values...
-//
-#define WEBSHELL_GLOBAL_CONTRACTID_KEY "nsWebShell"
-#define WEBSHELL_GLOBAL_CONTRACTID_DESC "Netscape NGLayout WebShell Component"
-
-#define WEBSHELL_CONTRACTID_KEY WEBSHELL_GLOBAL_CONTRACTID_KEY ## "1.0"
-#define WEBSHELL_CONTRACTID_DESC WEBSHELL_GLOBAL_CONTRACTID_KEY ## " Version 1.0"
-
-#define WEBSHELL_CLSID_DESC WEBSHELL_CONTRACTID_DESC
-
-
-
-static GUID WebShellCID = NS_WEB_SHELL_CID;
-
-BOOL WINAPI DllMain(HINSTANCE hDllInst,
- DWORD fdwReason,
- LPVOID lpvReserved)
-{
- BOOL bResult = TRUE;
-
- switch (fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- {
- // save our instance
- g_DllInst = hDllInst;
- }
- break;
-
- case DLL_PROCESS_DETACH:
- break;
-
- case DLL_THREAD_ATTACH:
- break;
-
- case DLL_THREAD_DETACH:
- break;
-
- default:
- break;
- }
-
- return (bResult);
-}
-
-/*
- * COM entry-point for creating class factories...
- */
-STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
-{
- static PRBool isFirstTime = PR_TRUE;
- HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
- nsIFactory* pFactory = NULL;
- nsresult rv;
-
- //
- // If this is the first time, then do the necessary global
- // initialization....
- //
- // This initialization should really be done somewhere else, but
- // for now here is as good a place as any...
- //
- if (PR_TRUE == isFirstTime) {
-
- // Get dll directory
- char binpath[_MAX_PATH];
- ::GetModuleFileName(g_DllInst, binpath, _MAX_PATH);
- char *lastslash = PL_strrchr(binpath, '\\');
- if (lastslash) *lastslash = '\0';
-
- // Get existing search path
- int len = GetEnvironmentVariable("PATH", NULL, 0);
- char *newpath = (char *) PR_Malloc(sizeof(char) * (len +
- PL_strlen(binpath) +
- 2)); // ';' + '\0'
- GetEnvironmentVariable("PATH", newpath, len + 1);
- PL_strcat(newpath, ";");
- PL_strcat(newpath, binpath);
-
- // Set new search path
- SetEnvironmentVariable("PATH", newpath);
-
- // Clean up
- PR_Free(newpath);
-
- // PR_AttachThread(PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL);
- NS_SetupRegistry();
-
- // Create the Event Queue for the UI thread...
- //
- // If an event queue already exists for the thread, then
- // CreateThreadEventQueue(...) will fail...
- static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
- static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
-
- nsIEventQueueService* eventQService = nsnull;
-
- rv = nsServiceManager::GetService(kEventQueueServiceCID,
- kIEventQueueServiceIID,
- (nsISupports **)&eventQService);
- if (NS_SUCCEEDED(rv)) {
- rv = eventQService->CreateThreadEventQueue();
- nsServiceManager::ReleaseService(kEventQueueServiceCID, eventQService);
- }
-
-
- isFirstTime = PR_FALSE;
- }
-
- if (WebShellCID == rclsid) {
- rv = NS_NewWebShellFactory(&pFactory);
- if (NS_OK != rv) {
- hr = E_OUTOFMEMORY;
- }
- }
-
- if (nsnull != pFactory) {
- // This is an evil cast, but it should be safe...
- rv = ((IUnknown*)pFactory)->QueryInterface(riid, ppv);
- if (NS_OK != rv) {
- hr = E_NOINTERFACE;
- } else {
- hr = S_OK;
- }
- }
-
- return hr;
-}
-
-
-
-/*
- * Helper function to register a key/sub-key in the Windows registry...
- */
-void RegisterKey(char *aKey, const char *aSubKey, const char *aValue, const char* aValueName=NULL)
-{
- LONG rv;
- HKEY hKey;
- char keyName[256];
-
- if (NULL != aSubKey) {
- PR_snprintf(keyName, sizeof(keyName), "%s\\%s", aKey, aSubKey);
- } else {
- PR_snprintf(keyName, sizeof(keyName), "%s", aKey);
- }
-
- rv = RegCreateKeyEx(HKEY_CLASSES_ROOT,
- keyName,
- 0,
- NULL,
- REG_OPTION_NON_VOLATILE,
- KEY_ALL_ACCESS,
- NULL,
- &hKey,
- NULL);
-
- if (rv == ERROR_SUCCESS) {
- if (NULL != aValue) {
- RegSetValueEx(hKey,
- aValueName,
- 0,
- REG_SZ,
- (const BYTE*)aValue,
- strlen(aValue));
- }
- RegCloseKey(hKey);
- }
-}
-
-/*
- * Helper function to remove a key/sub-key from the Windows registry...
- */
-void UnRegisterKey(char *aKey, const char *aSubKey)
-{
- char keyName[256];
-
- if (NULL != aSubKey) {
- PR_snprintf(keyName, sizeof(keyName), "%s\\%s", aKey, aSubKey);
- } else {
- PR_snprintf(keyName, sizeof(keyName), "%s", aKey);
- }
-
- RegDeleteKey(HKEY_CLASSES_ROOT, keyName);
-}
-
-
-
-/*
- * COM entry-point to register all COM Components for the DLL
- * in the Windows registry...
- *
- * Typically this entry-point is called by regsvr32.exe or an
- * installer...
- */
-STDAPI DllRegisterServer(void)
-{
- char* WebShellCLSID;
- char WebShellCLSIDkey[255];
- char WebShellDLLPath[MAX_PATH];
-
- //
- // Create a printable string from the WebShell CLSID
- //
- // This is a hack to convert the Unicode string returned by
- // StringFromIID(...) into an ansi string...
- //
- PRUnichar IIDString[255];
- nsString tmp;
-
- StringFromGUID2(WebShellCID, IIDString, sizeof(IIDString));
- tmp = IIDString;
- WebShellCLSID = ToNewCString(tmp);
-
- // end hack...
-
- PR_snprintf(WebShellCLSIDkey, sizeof(WebShellCLSIDkey), "CLSID\\%s", WebShellCLSID);
-
-
- // Obtain the path to this module's executable file for later use.
- GetModuleFileName(g_DllInst, WebShellDLLPath, sizeof(WebShellDLLPath));
-
- //
- // Register/Create the following registry keys:
- // nsWebShell1.0
- // nsWebShell1.0/CLSID
- //
- RegisterKey(WEBSHELL_CONTRACTID_KEY, NULL, WEBSHELL_CONTRACTID_DESC);
- RegisterKey(WEBSHELL_CONTRACTID_KEY, "CLSID", WebShellCLSID);
-
- //
- // Register/Create the following registry keys:
- // nsWebShell
- // nsWebShell/CurVer
- // nsWebShell/CLSID
- //
- RegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, NULL, WEBSHELL_GLOBAL_CONTRACTID_DESC);
- RegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CurVer", WEBSHELL_CONTRACTID_KEY);
- RegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CLSID", WebShellCLSID);
-
- //
- // Register/Create the following registry keys:
- // CLSID/{ CLSID }
- // CLSID/{ CLSID }/ContractID
- // CLSID/{ CLSID }/VersionIndependentContractID
- // CLSID/{ CLSID }/NotInsertable
- // CLSID/{ CLSID }/InprocServer32
- //
- RegisterKey(WebShellCLSIDkey, NULL, WEBSHELL_CLSID_DESC);
- RegisterKey(WebShellCLSIDkey, "ContractID", WEBSHELL_CONTRACTID_KEY);
- RegisterKey(WebShellCLSIDkey, "VersionIndependentContractID", WEBSHELL_GLOBAL_CONTRACTID_KEY);
- RegisterKey(WebShellCLSIDkey, "NotInsertable", NULL);
- RegisterKey(WebShellCLSIDkey, "InprocServer32", WebShellDLLPath);
- RegisterKey(WebShellCLSIDkey, "InprocServer32", "Apartment", "ThreadingModel");
-
- // Free up memory...
- if (WebShellCLSID) {
- delete[] WebShellCLSID;
- }
-
- return NOERROR;
-}
-
-
-/*
- * COM entry-point to remove all COM Components for the DLL
- * from the Windows registry...
- *
- * Typically this entry-point is called by regsvr32.exe /u or an
- * installer...
- */
-STDAPI DllUnregisterServer(void)
-{
- char* WebShellCLSID;
- char WebShellCLSIDkey[255];
-
- //
- // Create a printable string from the WebShell CLSID
- //
- // This is a hack to convert the Unicode string returned by
- // StringFromIID(...) into an ansi string...
- //
- PRUnichar IIDString[255];
- nsString tmp;
-
- StringFromGUID2(WebShellCID, IIDString, sizeof(IIDString));
- tmp = IIDString;
- WebShellCLSID = ToNewCString(tmp);
-
- // end hack...
-
- PR_snprintf(WebShellCLSIDkey, sizeof(WebShellCLSIDkey), "CLSID\\%s", WebShellCLSID);
-
- //
- // Remove the following registry keys:
- // nsWebShell1.0/CLSID
- // nsWebShell1.0
- //
- UnRegisterKey(WEBSHELL_CONTRACTID_KEY, "CLSID");
- UnRegisterKey(WEBSHELL_CONTRACTID_KEY, NULL);
-
- //
- // Remove the following registry keys:
- // nsWebShell/CLSID
- // nsWebShell/CurVer
- // nsWebShell
- //
- UnRegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CLSID");
- UnRegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CurVer");
- UnRegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, NULL);
-
- //
- // Remove the following registry keys:
- // CLSID/{ CLSID }/InprocServer32
- // CLSID/{ CLSID }/NotInsertable
- // CLSID/{ CLSID }/VersionIndependentContractID
- // CLSID/{ CLSID }/ContractID
- // CLSID/{ CLSID }
- //
- UnRegisterKey(WebShellCLSIDkey, "InprocServer32");
- UnRegisterKey(WebShellCLSIDkey, "NotInsertable");
- UnRegisterKey(WebShellCLSIDkey, "VersionIndependentContractID");
- UnRegisterKey(WebShellCLSIDkey, "ContractID");
- UnRegisterKey(WebShellCLSIDkey, NULL);
-
- // Free up memory...
- if (WebShellCLSID) {
- delete[] WebShellCLSID;
- }
-
- return NOERROR;
-}
-
-#endif // XP_PC
-
diff --git a/mozilla/webshell/src/webshell.def b/mozilla/webshell/src/webshell.def
deleted file mode 100644
index d3876f4a26d..00000000000
--- a/mozilla/webshell/src/webshell.def
+++ /dev/null
@@ -1,30 +0,0 @@
-; -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-;
-; The contents of this file are subject to the Netscape Public
-; License Version 1.1 (the "License"); you may not use this file
-; except in compliance with the License. You may obtain a copy of
-; the License at http://www.mozilla.org/NPL/
-;
-; Software distributed under the License is distributed on an "AS
-; IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-; implied. See the License for the specific language governing
-; rights and limitations under the License.
-;
-; The Original Code is Mozilla Communicator client code.
-;
-; The Initial Developer of the Original Code is Netscape Communications
-; Corporation. Portions created by Netscape are
-; Copyright (C) 1998 Netscape Communications Corporation. All
-; Rights Reserved.
-;
-; Contributor(s):
-;
-LIBRARY GKWEB
-
-DESCRIPTION 'GKWEB.DLL - NGLayout Web Widget Control.'
-
-EXPORTS
- DllGetClassObject PRIVATE
-; DllCanUnloadNow PRIVATE
- DllRegisterServer PRIVATE
- DllUnregisterServer PRIVATE
diff --git a/mozilla/webshell/tests/viewer/Makefile.in b/mozilla/webshell/tests/viewer/Makefile.in
index a7851bea51d..45ff7fb5393 100644
--- a/mozilla/webshell/tests/viewer/Makefile.in
+++ b/mozilla/webshell/tests/viewer/Makefile.in
@@ -67,7 +67,6 @@ CPPSRCS = \
nsPrintSetupDialog.cpp \
nsBrowserWindow.cpp \
nsEditorMode.cpp \
- nsSetupRegistry.cpp \
nsThrobber.cpp \
nsViewerApp.cpp \
nsWebCrawler.cpp \
diff --git a/mozilla/webshell/tests/viewer/mac/viewer.xml b/mozilla/webshell/tests/viewer/mac/viewer.xml
index ea9282942fd..95daf504c56 100644
--- a/mozilla/webshell/tests/viewer/mac/viewer.xml
+++ b/mozilla/webshell/tests/viewer/mac/viewer.xml
@@ -1000,13 +1000,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
xpcomDebug.shlb
@@ -1164,11 +1157,6 @@
nsWebCrawler.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
nsBrowserWindow.cpp
@@ -2193,13 +2181,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
xpcom.shlb
@@ -2362,11 +2343,6 @@
nsWebCrawler.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
xpcom.shlb
@@ -3386,13 +3362,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
xpcom.shlb
@@ -3562,11 +3531,6 @@
nsWebCrawler.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
xpcom.shlb
@@ -4591,13 +4555,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
xpcomDebug.shlb
@@ -4762,11 +4719,6 @@
nsWebCrawler.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
nsBrowserWindow.cpp
@@ -4904,12 +4856,6 @@
nsPrintSetupDialog.cpp
MacOS
-
- viewerDebug
- Name
- nsSetupRegistry.cpp
- MacOS
-
viewerDebug
Name
diff --git a/mozilla/webshell/tests/viewer/makefile.win b/mozilla/webshell/tests/viewer/makefile.win
index 793607c0aae..25a2e1c011a 100644
--- a/mozilla/webshell/tests/viewer/makefile.win
+++ b/mozilla/webshell/tests/viewer/makefile.win
@@ -74,7 +74,6 @@ OBJS = \
.\$(OBJDIR)\nsXPBaseWindow.obj \
.\$(OBJDIR)\nsBrowserWindow.obj \
.\$(OBJDIR)\nsEditorMode.obj \
- .\$(OBJDIR)\nsSetupRegistry.obj \
.\$(OBJDIR)\nsThrobber.obj \
.\$(OBJDIR)\nsViewerApp.obj \
.\$(OBJDIR)\nsWebCrawler.obj \
diff --git a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp
deleted file mode 100644
index c7f53e82ef8..00000000000
--- a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Pierre Phaneuf
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-#define NS_IMPL_IDS
-#include "nsCOMPtr.h"
-#include "nsIComponentManager.h"
-#include "nsWidgetsCID.h"
-#include "nsViewsCID.h"
-
-#include "nsIDocumentLoader.h"
-
-#include "nsDOMCID.h"
-#include "nsIProperties.h"
-
-#include "nsIObserverService.h"
-#include "nsIObserver.h"
-#include "nsIMemory.h"
-#include "nsIEventQueue.h"
-#include "nsIEventQueueService.h"
-#include "nsIGenericFactory.h"
-#include "nsGfxCIID.h"
-#include "nsSpecialSystemDirectory.h"
-
-#include "nsISound.h"
-
-#include "prprf.h"
-#include "prmem.h"
-#include "prlog.h" // PR_ASSERT
-
-#if defined(XP_OS2)
- #define WIDGET_DLL "WDGTOS2"
- #define GFXWIN_DLL "GFX_OS2"
-#elif defined(XP_PC)
- #define WIDGET_DLL "gkwidget.dll"
- #define GFXWIN_DLL "gkgfxwin.dll"
-#elif defined(XP_MAC)
- #define WIDGET_DLL "WIDGET_DLL"
- #define GFXWIN_DLL "GFXWIN_DLL"
-#endif
-
-// Class ID's
-
-// WIDGET
-#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
-static NS_DEFINE_IID(kCLookAndFeelCID, NS_LOOKANDFEEL_CID);
-static NS_DEFINE_IID(kCWindowCID, NS_WINDOW_CID);
-static NS_DEFINE_IID(kCVScrollbarCID, NS_VERTSCROLLBAR_CID);
-static NS_DEFINE_IID(kCHScrollbarCID, NS_HORZSCROLLBAR_CID);
-static NS_DEFINE_IID(kCDialogCID, NS_DIALOG_CID);
-static NS_DEFINE_IID(kCChildCID, NS_CHILD_CID);
-static NS_DEFINE_IID(kCAppShellCID, NS_APPSHELL_CID);
-static NS_DEFINE_IID(kCToolkitCID, NS_TOOLKIT_CID);
-static NS_DEFINE_IID(kClipboardCID, NS_CLIPBOARD_CID);
-static NS_DEFINE_CID(kClipboardHelperCID, NS_CLIPBOARDHELPER_CID);
-static NS_DEFINE_CID(kCTransferableCID, NS_TRANSFERABLE_CID);
-static NS_DEFINE_IID(kDataFlavorCID, NS_DATAFLAVOR_CID);
-static NS_DEFINE_IID(kCHTMLFormatConverterCID, NS_HTMLFORMATCONVERTER_CID);
-static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID);
-static NS_DEFINE_IID(kSoundCID, NS_SOUND_CID);
-static NS_DEFINE_IID(kCFilePickerCID, NS_FILEPICKER_CID);
-static NS_DEFINE_IID(kCPopUpCID,NS_POPUP_CID);
-
-#ifdef IBMBIDI
-static NS_DEFINE_IID(kCBidiKeyboardCID, NS_BIDIKEYBOARD_CID);
-#endif
-
-// widgets
-static NS_DEFINE_IID(kCLabelCID, NS_LABEL_CID);
-static NS_DEFINE_IID(kCButtonCID, NS_BUTTON_CID);
-static NS_DEFINE_IID(kCTextFieldCID, NS_TEXTFIELD_CID);
-static NS_DEFINE_IID(kCCheckButtonCID, NS_CHECKBUTTON_CID);
-#endif
-
-// GFXWIN
-#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
-static NS_DEFINE_CID(kCRenderingContextCID, NS_RENDERING_CONTEXT_CID);
-static NS_DEFINE_CID(kCDeviceContextCID, NS_DEVICE_CONTEXT_CID);
-static NS_DEFINE_CID(kCFontMetricsCID, NS_FONT_METRICS_CID);
-static NS_DEFINE_CID(kCFontEnumeratorCID, NS_FONT_ENUMERATOR_CID);
-static NS_DEFINE_CID(kCFontListCID, NS_FONTLIST_CID);
-static NS_DEFINE_CID(kCImageCID, NS_IMAGE_CID);
-static NS_DEFINE_CID(kCRegionCID, NS_REGION_CID);
-static NS_DEFINE_CID(kCScriptableRegionCID, NS_SCRIPTABLE_REGION_CID);
-static NS_DEFINE_CID(kCBlenderCID, NS_BLENDER_CID);
-static NS_DEFINE_CID(kCDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
-static NS_DEFINE_CID(kCDeviceContextSpecFactoryCID, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID);
-static NS_DEFINE_CID(kImageManagerCID, NS_IMAGEMANAGER_CID);
-static NS_DEFINE_CID(kScreenManagerCID, NS_SCREENMANAGER_CID);
-static NS_DEFINE_CID(kPrintOptionsCID,NS_PRINTOPTIONS_CID);
-#endif
-
-extern "C" void
-NS_SetupRegistry()
-{
-
-#ifdef XP_UNIX
-#undef WIDGET_DLL
-#undef GFXWIN_DLL
-#endif /* defined(XP_UNIX) */
-
- // WIDGET
-#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
- nsComponentManager::RegisterComponentLib(kCLookAndFeelCID, NULL, "@mozilla.org/widget/lookandfeel;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCWindowCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCVScrollbarCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCHScrollbarCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCDialogCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCChildCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCPopUpCID,NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCAppShellCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCToolkitCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kClipboardCID, "Clipboard", "@mozilla.org/widget/clipboard;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kClipboardHelperCID, "Clipboard Helper", "@mozilla.org/widget/clipboardhelper;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCTransferableCID, "Transferable", "@mozilla.org/widget/transferable;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kDataFlavorCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCHTMLFormatConverterCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCDragServiceCID, "Drag Service", "@mozilla.org/widget/dragservice;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kSoundCID, "Sound Services", "@mozilla.org/sound;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCFilePickerCID, "FilePicker", "@mozilla.org/filepicker;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
-
-#ifdef IBMBIDI
- nsComponentManager::RegisterComponentLib(kCBidiKeyboardCID, "Bidi Keyboard", "@mozilla.org/widget/bidikeyboard;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
-#endif
-
- // WIDGETS
- nsComponentManager::RegisterComponentLib(kCLabelCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCButtonCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCTextFieldCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCCheckButtonCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
-#endif
-
- // MAC ONLY WIDGETS
-#ifdef XP_MAC
- static NS_DEFINE_IID(kCMenuBarCID, NS_MENUBAR_CID);
- static NS_DEFINE_IID(kCMenuCID, NS_MENU_CID);
- static NS_DEFINE_IID(kCMenuItemCID, NS_MENUITEM_CID);
-
- nsComponentManager::RegisterComponentLib(kCMenuBarCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCMenuCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCMenuItemCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
-#endif
-
- // GFXWIN
-#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
- nsComponentManager::RegisterComponentLib(kCRenderingContextCID, "Rendering Context", "@mozilla.org/gfx/renderingcontext;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCDeviceContextCID, "Device Context", "@mozilla.org/gfx/devicecontext;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCFontMetricsCID, "Font Metrics", "@mozilla.org/gfx/fontmetrics;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCFontEnumeratorCID, "Font Enumerator", "@mozilla.org/gfx/fontenumerator;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCFontListCID, "Font List", "@mozilla.org/gfx/fontlist;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCImageCID, "Image", "@mozilla.org/gfx/image;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCRegionCID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCScriptableRegionCID, "Region", "@mozilla.org/gfx/region;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCBlenderCID, "Blender", "@mozilla.org/gfx/blender;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCDeviceContextSpecCID, "Device Context Spec", "@mozilla.org/gfx/devicecontextspec;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kCDeviceContextSpecFactoryCID, "Device Context Spec Factory", "@mozilla.org/gfx/devicecontextspecfactory;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kImageManagerCID, "Image Manager", "@mozilla.org/gfx/imagemanager;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kScreenManagerCID, "Screen Manager", "@mozilla.org/gfx/screenmanager;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponentLib(kPrintOptionsCID, "PrintOptions", "@mozilla.org/gfx/printoptions;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
-#endif
-
-}
diff --git a/mozilla/webshell/tests/viewer/nsViewerApp.cpp b/mozilla/webshell/tests/viewer/nsViewerApp.cpp
index 047343106b3..44c5ba37fc8 100644
--- a/mozilla/webshell/tests/viewer/nsViewerApp.cpp
+++ b/mozilla/webshell/tests/viewer/nsViewerApp.cpp
@@ -114,7 +114,6 @@
#endif
extern nsresult NS_NewXPBaseWindowFactory(nsIFactory** aFactory);
-extern "C" void NS_SetupRegistry();
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_IID(kAppShellCID, NS_APPSHELL_CID);
@@ -252,23 +251,12 @@ NS_METHOD nsTestFormProcessor::ProvideContent(const nsString& aFormType,
}
-nsresult
-nsViewerApp::AutoregisterComponents()
-{
- nsresult rv = nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
- NULL /* default */);
-
- return rv;
-}
-
-
nsresult
nsViewerApp::SetupRegistry()
{
nsresult rv;
- AutoregisterComponents();
-
- NS_SetupRegistry();
+ nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
+ NULL /* default */);
// Register our browser window factory
nsIFactory* bwf;
diff --git a/mozilla/webshell/tests/viewer/nsViewerApp.h b/mozilla/webshell/tests/viewer/nsViewerApp.h
index 1ddf059e116..bb4680fc2ac 100644
--- a/mozilla/webshell/tests/viewer/nsViewerApp.h
+++ b/mozilla/webshell/tests/viewer/nsViewerApp.h
@@ -82,7 +82,6 @@ protected:
nsresult InitializeWindowCreator();
void Destroy();
- nsresult AutoregisterComponents();
nsIAppShell* mAppShell;
nsIPref* mPrefs;
diff --git a/mozilla/widget/src/beos/Makefile.in b/mozilla/widget/src/beos/Makefile.in
index 815c4c9b707..49624807aae 100644
--- a/mozilla/widget/src/beos/Makefile.in
+++ b/mozilla/widget/src/beos/Makefile.in
@@ -26,9 +26,11 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-MODULE = widget
+MODULE = widget
LIBRARY_NAME = widget_beos
-EXPORT_LIBRARY = 1
+EXPORT_LIBRARY = 1
+IS_COMPONENT = 1
+MODULE_NAME = nsWidgetBeOSModule
REQUIRES = xpcom \
string \
diff --git a/mozilla/xpcom/proxy/tests/proxytests.cpp b/mozilla/xpcom/proxy/tests/proxytests.cpp
index 8774e001db3..0855584db71 100644
--- a/mozilla/xpcom/proxy/tests/proxytests.cpp
+++ b/mozilla/xpcom/proxy/tests/proxytests.cpp
@@ -38,6 +38,7 @@
#include
+#include "nsXPCOM.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
@@ -54,14 +55,6 @@
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
-/***************************************************************************/
-extern "C" void
-NS_SetupRegistry()
-{
- nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, NULL /* default */);
-}
-
-
/***************************************************************************/
/* nsTestXPCFoo */
/***************************************************************************/
@@ -503,7 +496,9 @@ main(int argc, char **argv)
if (argc > 1)
numberOfThreads = atoi(argv[1]);
- NS_SetupRegistry();
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
+ nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
+ NULL /* default */);
static PRThread** threads = (PRThread**) calloc(sizeof(PRThread*), numberOfThreads);
diff --git a/mozilla/xpcom/tests/PropertiesTest.cpp b/mozilla/xpcom/tests/PropertiesTest.cpp
index e9f2b4bafd0..dc0a53f4f69 100644
--- a/mozilla/xpcom/tests/PropertiesTest.cpp
+++ b/mozilla/xpcom/tests/PropertiesTest.cpp
@@ -39,6 +39,7 @@
#ifndef XPCOM_STANDALONE
#define NS_IMPL_IDS
+#include "nsXPCOM.h"
#include "nsIEventQueueService.h"
#include "nsIPersistentProperties2.h"
#include "nsIServiceManager.h"
@@ -53,63 +54,13 @@
#include "nsSpecialSystemDirectory.h"
-#ifdef XP_PC
-#include "plevent.h"
-#endif
-
#define TEST_URL "resource:/res/test.properties"
-#ifdef XP_PC
-#define NETLIB_DLL "netlib.dll"
-#define RAPTORBASE_DLL "raptorbase.dll"
-#define XPCOM_DLL "xpcom32.dll"
-#else
-#ifdef XP_MAC
-#define NETLIB_DLL "NETLIB_DLL"
-#define RAPTORBASE_DLL "base.shlb"
-#define XPCOM_DLL "XPCOM_DLL"
-#else
-#define NETLIB_DLL "libnetlib"MOZ_DLL_SUFFIX
-#define RAPTORBASE_DLL "libraptorbase"MOZ_DLL_SUFFIX
-#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
-#endif
-#endif
-
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
/***************************************************************************/
-extern "C" void
-NS_SetupRegistry()
-{
- nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
- NULL /* default */);
-
- // startup netlib:
- nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
- nsComponentManager::RegisterComponent(kIOServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
-
- // Create the Event Queue for this thread...
- nsIEventQueueService* pEventQService;
-
- pEventQService = nsnull;
- nsresult result = nsServiceManager::GetService(kEventQueueServiceCID,
- NS_GET_IID(nsIEventQueueService),
- (nsISupports **)&pEventQService);
- if (NS_SUCCEEDED(result)) {
- // XXX: What if this fails?
- result = pEventQService->CreateThreadEventQueue();
- }
-
- nsComponentManager::RegisterComponent(kPersistentPropertiesCID,
- NULL,
- NULL,
- RAPTORBASE_DLL,
- PR_FALSE,
- PR_FALSE);
-}
-
#endif
int
@@ -118,7 +69,16 @@ main(int argc, char* argv[])
#ifndef XPCOM_STANDALONE
nsresult ret;
- NS_SetupRegistry();
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
+ nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
+ NULL /* default */);
+
+ // Create the Event Queue for this thread...
+ nsCOMPtr pEventQService =
+ do_GetService(kEventQueueServiceCID);
+ if (pEventQService)
+ // XXX: What if this fails?
+ pEventQService->CreateThreadEventQueue();
nsIInputStream* in = nsnull;
diff --git a/mozilla/xpcom/tests/nsIFileTest.cpp b/mozilla/xpcom/tests/nsIFileTest.cpp
index be2803b217e..d9c3749fa66 100644
--- a/mozilla/xpcom/tests/nsIFileTest.cpp
+++ b/mozilla/xpcom/tests/nsIFileTest.cpp
@@ -1,6 +1,7 @@
#include "nsILocalFile.h"
#include
+#include "nsXPCOM.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIMemory.h"
@@ -63,12 +64,6 @@ void GetPaths(nsILocalFile* file)
printf("filepath: %s\n", (const char *)pathName);
}
-extern "C" void
-NS_SetupRegistry()
-{
- nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, NULL);
-}
-
void InitTest(const char* creationPath, const char* appendPath)
{
nsILocalFile* file = nsnull;
@@ -319,7 +314,9 @@ DeletionTest(const char* creationPath, const char* appendPath, PRBool recursive)
int main(void)
{
- NS_SetupRegistry();
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
+ nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
+ NULL);
#ifdef XP_PC
diff --git a/mozilla/xpfe/bootstrap/Makefile.in b/mozilla/xpfe/bootstrap/Makefile.in
index a51fec3176a..99197820c0f 100644
--- a/mozilla/xpfe/bootstrap/Makefile.in
+++ b/mozilla/xpfe/bootstrap/Makefile.in
@@ -90,7 +90,6 @@ endif
CPPSRCS = \
nsAppRunner.cpp \
- nsSetupRegistry.cpp \
nsWindowCreator.cpp \
nsSigHandlers.cpp \
showOSAlert.cpp \
diff --git a/mozilla/xpfe/bootstrap/macbuild/apprunner.xml b/mozilla/xpfe/bootstrap/macbuild/apprunner.xml
index eaa79f6fa1b..2f3ba2d4fb9 100644
--- a/mozilla/xpfe/bootstrap/macbuild/apprunner.xml
+++ b/mozilla/xpfe/bootstrap/macbuild/apprunner.xml
@@ -982,13 +982,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
InterfacesStubs
@@ -1250,11 +1243,6 @@
nsAppRunner.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
InterfacesStubs
@@ -2341,13 +2329,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
InterfacesStubs
@@ -2609,11 +2590,6 @@
nsAppRunner.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
InterfacesStubs
@@ -3700,13 +3676,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
InterfacesStubs
@@ -3982,11 +3951,6 @@
nsAppRunner.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
InterfacesStubs
@@ -5083,13 +5047,6 @@
Text
Debug
-
- Name
- nsSetupRegistry.cpp
- MacOS
- Text
- Debug
-
Name
InterfacesStubs
@@ -5365,11 +5322,6 @@
nsAppRunner.cpp
MacOS
-
- Name
- nsSetupRegistry.cpp
- MacOS
-
Name
InterfacesStubs
@@ -5554,12 +5506,6 @@
nsAppRunner.cpp
MacOS
-
- apprunnerDebug
- Name
- nsSetupRegistry.cpp
- MacOS
-
apprunnerDebug
Name
diff --git a/mozilla/xpfe/bootstrap/makefile.win b/mozilla/xpfe/bootstrap/makefile.win
index e19487fc696..cc690828b46 100644
--- a/mozilla/xpfe/bootstrap/makefile.win
+++ b/mozilla/xpfe/bootstrap/makefile.win
@@ -59,7 +59,6 @@ GARBAGE=$(GARBAGE) $(EXTRA_LIBS_LIST_FILE) $(SEDCMDS) nsStaticComponents.cpp
CPP_OBJS= \
.\$(OBJDIR)\nsAppRunner.obj \
- .\$(OBJDIR)\nsSetupRegistry.obj \
.\$(OBJDIR)\nsWindowCreator.obj \
.\$(OBJDIR)\nsNativeAppSupportBase.obj \
.\$(OBJDIR)\nsNativeAppSupportWin.obj \
diff --git a/mozilla/xpfe/bootstrap/nsAppRunner.cpp b/mozilla/xpfe/bootstrap/nsAppRunner.cpp
index 60895293f30..c153809b0f3 100644
--- a/mozilla/xpfe/bootstrap/nsAppRunner.cpp
+++ b/mozilla/xpfe/bootstrap/nsAppRunner.cpp
@@ -356,8 +356,6 @@ static int TranslateReturnValue(nsresult aResult)
#include "nsCommandLineServiceMac.h"
#endif
-extern "C" void NS_SetupRegistry_1(PRBool aNeedAutoreg);
-
static void
PrintUsage(void)
{
@@ -1110,10 +1108,12 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp )
needAutoReg = PR_TRUE;
#endif
- NS_SetupRegistry_1(needAutoReg);
-
- if (needAutoReg) // XXX ...and autoreg was successful?
+ if (needAutoReg) {
+ nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
+ NULL /* default */);
+ // XXX ...and autoreg was successful?
NS_SoftwareUpdateDidAutoReg();
+ }
NS_TIMELINE_LEAVE("setup registry");
// remove the nativeApp as an XPCOM autoreg observer
diff --git a/mozilla/xpfe/bootstrap/nsSetupRegistry.cpp b/mozilla/xpfe/bootstrap/nsSetupRegistry.cpp
deleted file mode 100644
index 08cb1fee399..00000000000
--- a/mozilla/xpfe/bootstrap/nsSetupRegistry.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#define NS_IMPL_IDS
-/*
- * This evil file will go away when the XPCOM registry can be
- * externally initialized!
- *
- * Until then, include the real file to keep everything in sync.
- */
-#ifdef XP_MAC
-#include ":::webshell:tests:viewer:nsSetupRegistry.cpp"
-#else
-#include "../../webshell/tests/viewer/nsSetupRegistry.cpp"
-#endif
-
-extern "C" void
-NS_SetupRegistry_1( PRBool needAutoreg )
-{
- if ( needAutoreg )
- nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
- NULL /* default */);
-
- /*
- * Call the standard NS_SetupRegistry() implemented in
- * webshell/tests/viewer/nsSetupregistry.cpp
- */
- NS_SetupRegistry();
-}
-
-
-
-
diff --git a/mozilla/xpinstall/standalone/standalone.cpp b/mozilla/xpinstall/standalone/standalone.cpp
index 422aae13346..7ba336765d0 100644
--- a/mozilla/xpinstall/standalone/standalone.cpp
+++ b/mozilla/xpinstall/standalone/standalone.cpp
@@ -37,6 +37,7 @@
#include
+#include "nsXPCOM.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
@@ -60,14 +61,6 @@ static NS_DEFINE_IID(kSoftwareUpdateCID, NS_SoftwareUpdate_CID);
/*********************************************/
-extern "C" void
-NS_SetupRegistry()
-{
- nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
- nsnull /* default */);
-}
- /***************************************************************************/
-
static void
xpinstall_usage(int argc, char *argv[])
{
@@ -104,9 +97,9 @@ main(int argc, char **argv)
}
-
- NS_SetupRegistry();
-
+ NS_InitXPCOM2(nsnull, nsnull, nsnull);
+ nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
+ nsnull /* default */);
nsresult rv = nsComponentManager::CreateInstance(kSoftwareUpdateCID,