Backed out changeset 7c0438df6767
authorBas Schouten <bschouten@mozilla.com>
Fri, 27 Aug 2010 22:52:02 +0000
changeset 51617 4bbe896fbc0394cc59dd539097d56536c30ddedd
parent 51611 7c0438df676786d8fa91cea905fb4d6371c404dd
child 51618 463afffc9e7fec88d55fdfbf3f936094c16b65de
push idunknown
push userunknown
push dateunknown
milestone2.0b5pre
backs out7c0438df676786d8fa91cea905fb4d6371c404dd
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 7c0438df6767
browser/app/Makefile.in
browser/app/nsBrowserApp.cpp
browser/components/build/Makefile.in
browser/components/build/nsModule.cpp
browser/components/dirprovider/Makefile.in
browser/installer/Makefile.in
browser/installer/package-manifest.in
browser/installer/removed-files.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -87,22 +87,16 @@ else
 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
 PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX)
 else
 PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
 endif
 
 CPPSRCS = nsBrowserApp.cpp
 
-LIBS += \
-  $(call EXPAND_LIBNAME_PATH,browsercomps,../components/build) \
-  $(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \
-  $(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
-  $(NULL)
-
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
 
 ifdef BUILD_STATIC_LIBS
 ifdef _MSC_VER
 STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(DEPTH)/staticlib
 else
 STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
 endif
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -101,18 +101,16 @@ static PRBool IsArg(const char* arg, con
  */
 class ScopedLogging
 {
 public:
   ScopedLogging() { NS_LogInit(); }
   ~ScopedLogging() { NS_LogTerm(); }
 };
 
-extern const mozilla::Module kBrowserModule;
-
 int main(int argc, char* argv[])
 {
   ScopedLogging log;
 
   nsCOMPtr<nsILocalFile> appini;
   nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
   if (NS_FAILED(rv)) {
     Output("Couldn't calculate the application directory.");
@@ -152,16 +150,14 @@ int main(int argc, char* argv[])
 
   nsXREAppData *appData;
   rv = XRE_CreateAppData(appini, &appData);
   if (NS_FAILED(rv)) {
     Output("Couldn't read application.ini");
     return 255;
   }
 
-  XRE_AddStaticComponent(&kBrowserModule);
-
   int result = XRE_main(argc, argv, appData);
   XRE_FreeAppData(appData);
   if (appEnv)
     PR_smprintf_free(appEnv);
   return result;
 }
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -2,25 +2,28 @@ DEPTH=../../..
 topsrcdir=@top_srcdir@
 srcdir=@srcdir@
 VPATH=@srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = browsercomps
 LIBRARY_NAME = browsercomps
-
-ifdef LIBXUL_SDK
+SHORT_LIBNAME = brwsrcmp
 IS_COMPONENT = 1
+MODULE_NAME = nsBrowserCompsModule
 FORCE_SHARED_LIB = 1
-else
-FORCE_STATIC_LIB = 1
-DEFINES += -DBROWSERCOMPS_LINK_STATICALLY
+
+# Because we are an application component, link against the CRT statically
+# (on Windows, but only if we're not building our own CRT for jemalloc)
+ifndef MOZ_MEMORY
+USE_STATIC_LIBS = 1
 endif
 
+
 EXPORTS = nsBrowserCompsCID.h
 
 CPPSRCS = nsModule.cpp \
           $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS	+= $(call EXPAND_LIBNAME,ole32 shell32)
 endif
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -232,18 +232,17 @@ static const mozilla::Module::ContractID
 };
 
 static const mozilla::Module::CategoryEntry kBrowserCategories[] = {
     { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", NS_BROWSERDIRECTORYPROVIDER_CONTRACTID },
     { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID },
     { NULL }
 };
 
-extern const mozilla::Module kBrowserModule = {
+static const mozilla::Module kBrowserModule = {
     mozilla::Module::kVersion,
     kBrowserCIDs,
     kBrowserContracts,
     kBrowserCategories
 };
 
-#ifndef BROWSERCOMPS_LINK_STATICALLY
 NSMODULE_DEFN(nsBrowserCompsModule) = &kBrowserModule;
-#endif
+
--- a/browser/components/dirprovider/Makefile.in
+++ b/browser/components/dirprovider/Makefile.in
@@ -58,9 +58,14 @@ endif
 
 EXPORTS_NAMESPACES = mozilla/browser
 EXPORTS_mozilla/browser = DirectoryProvider.h
 
 CPPSRCS = DirectoryProvider.cpp
 
 LOCAL_INCLUDES = -I$(srcdir)/../build
 
+EXTRA_DSO_LDOPTS = \
+	$(XPCOM_GLUE_LDOPTS) \
+	$(NSPR_LIBS) \
+	$(NULL)
+
 include $(topsrcdir)/config/rules.mk
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -105,18 +105,16 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 MOZ_PKG_MAC_DSSTORE=branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=branding/background.png
 MOZ_PKG_MAC_ICON=branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 
 ifndef LIBXUL_SDK
 INSTALL_SDK = 1
-else
-DEFINES += -DLIBXUL_SDK=1
 endif
 
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 ifeq (bundle, $(MOZ_FS_LAYOUT))
 BINPATH = $(_BINPATH)
 DEFINES += -DAPPNAME=$(_APPNAME)
 else
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -329,18 +329,20 @@
 @BINPATH@/components/nsUpdateTimerManager.manifest
 @BINPATH@/components/nsUpdateTimerManager.js
 @BINPATH@/components/pluginGlue.manifest
 @BINPATH@/components/nsSessionStore.manifest
 @BINPATH@/components/nsSessionStartup.js
 @BINPATH@/components/nsSessionStore.js
 @BINPATH@/components/nsURLFormatter.manifest
 @BINPATH@/components/nsURLFormatter.js
-#ifdef LIBXUL_SDK
+#ifndef XP_OS2
 @BINPATH@/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@
+#else
+@BINPATH@/components/brwsrcmp@DLL_SUFFIX@
 #endif
 @BINPATH@/components/txEXSLTRegExFunctions.manifest
 @BINPATH@/components/txEXSLTRegExFunctions.js
 @BINPATH@/components/toolkitplaces.manifest
 @BINPATH@/components/nsLivemarkService.js
 @BINPATH@/components/nsTaggingService.js
 @BINPATH@/components/nsPlacesDBFlush.js
 @BINPATH@/components/nsPlacesAutoComplete.manifest
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -32,19 +32,16 @@ chrome/m3ffxtbr.manifest
 chrome/overlayinfo/
 chrome/pippki.manifest
 chrome/reporter.jar
 chrome/reporter.manifest
 chrome/toolkit.manifest
 component.reg
 components/browser.manifest
 components/components.list
-#ifndef LIBXUL_SDK
-components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@
-#endif
 components/@DLL_PREFIX@browserdirprovider@DLL_SUFFIX@
 components/@DLL_PREFIX@brwsrdir@DLL_SUFFIX@
 components/@DLL_PREFIX@myspell@DLL_SUFFIX@
 components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
 components/@DLL_PREFIX@spellchk@DLL_SUFFIX@
 components/aboutCertError.js
 components/aboutPrivateBrowsing.js
 components/aboutRights.js