Bug 311965 (Sunbird patch) - Refactor nsUpdateService.js to load less code at startup. r=mschroeder
--- a/calendar/installer/Makefile.in
+++ b/calendar/installer/Makefile.in
@@ -75,16 +75,20 @@ MOZ_NONLOCALIZED_PKG_LIST = \
xpcom \
calendar \
$(NULL)
MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
DEFINES += -DAB_CD=$(AB_CD)
+ifdef MOZ_UPDATER
+DEFINES += -DMOZ_UPDATER=1
+endif
+
ifdef MOZ_PKG_MANIFEST_P
MOZ_PKG_MANIFEST = packages-static
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
--- a/calendar/installer/removed-files.in
+++ b/calendar/installer/removed-files.in
@@ -354,17 +354,25 @@ extensions/talkback@mozilla.org/componen
#else
extensions/talkback@mozilla.org/components/talkback/talkback
extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
extensions/talkback@mozilla.org/components/master.ini
extensions/talkback@mozilla.org/components/talkback.so
#endif
#endif
#
-
+# Clean out update service components if MOZ_UPDATER isn't defined
+#
+#ifndef MOZILLA_1_9_2_BRANCH
+#ifndef MOZ_UPDATER
+components/nsUpdateService.js
+components/nsUpdateServiceStub.js
+#endif
+#endif
+#
# bug 404085 (Consolidate provider methods into a default calendar
# implementation)
components/calDavCalendar.js
components/calICSCalendar.js
components/calMemoryCalendar.js
components/calStorageCalendar.js
# bug 381049 (Moved crashreporter interface)
components/crashreporter.xpt
--- a/calendar/installer/windows/Makefile.in
+++ b/calendar/installer/windows/Makefile.in
@@ -42,16 +42,20 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk
CONFIG_DIR = instgen
SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/sunbird/7zSD.sfx
+ifdef MOZ_UPDATER
+DEFINES += -DMOZ_UPDATER=1
+endif
+
PP_LOCALIZED_FILES = \
packages-static \
$(NULL)
# All script and locale files used by the Unicode version of NSIS need to be
# converted from UTF-8 to UTF-16LE
INSTALLER_FILES_CONV = \
nsis/installer.nsi \
--- a/calendar/installer/windows/packages-static
+++ b/calendar/installer/windows/packages-static
@@ -216,17 +216,25 @@ bin\components\nsLoginInfo.js
bin\components\nsLoginManager.js
bin\components\nsLoginManagerPrompter.js
#ifdef MOZILLA_1_9_1_BRANCH
bin\components\nsPostUpdateWin.js
#endif
bin\components\nsProgressDialog.js
bin\components\nsProxyAutoConfig.js
bin\components\nsTryToClose.js
+#ifdef MOZILLA_1_9_2_BRANCH
bin\components\nsUpdateService.js
+#else
+#ifdef MOZ_UPDATER
+bin\components\nsUpdateService.js
+bin\components\nsUpdateServiceStub.js
+#endif
+bin\components\nsUpdateTimerManager.js
+#endif
bin\components\nsURLFormatter.js
bin\components\nsWebHandlerApp.js
bin\components\pluginGlue.js
bin\components\storage-Legacy.js
bin\components\storage-mozStorage.js
bin\components\txEXSLTRegExFunctions.js
bin\calendar-js\calAlarm.js
bin\calendar-js\calAlarmMonitor.js