Bug 311965 (Sunbird patch) - Refactor nsUpdateService.js to load less code at startup. r=mschroeder
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 03 Nov 2009 11:55:07 -0800
changeset 4301 b1383e748fc7a08da97a441cbd6a9bd2dc49cec7
parent 4300 21d65f4a44395572c01b74f7cbc68de4b05d335e
child 4302 95694ec14a498ce5f61cd696006818683cb50fe5
push idunknown
push userunknown
push dateunknown
reviewersmschroeder
bugs311965
Bug 311965 (Sunbird patch) - Refactor nsUpdateService.js to load less code at startup. r=mschroeder
calendar/installer/Makefile.in
calendar/installer/removed-files.in
calendar/installer/windows/Makefile.in
calendar/installer/windows/packages-static
--- 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