Bug 827303 - Firefox core and crypto services components assume services/sync is built. Move registrations out of services/sync. r=gps
authorMark Banner <bugzilla@standard8.plus.com>
Thu, 10 Jan 2013 22:02:38 +0000
changeset 128345 6b8af725f32268e5ce51ab9d73cab62f9632864e
parent 128344 2d1152cf727e19ed879e50bfca5fb023d6d08a48
child 128346 715e21580ed2f61b1794fca9783eaa10029be2fa
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs827303
milestone21.0a1
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
Bug 827303 - Firefox core and crypto services components assume services/sync is built. Move registrations out of services/sync. r=gps
b2g/installer/package-manifest.in
browser/installer/package-manifest.in
mobile/xul/installer/package-manifest.in
services/common/Makefile.in
services/common/servicesComponents.manifest
services/crypto/Makefile.in
services/crypto/cryptoComponents.manifest
services/crypto/modules/WeaveCrypto.js
services/sync/SyncComponents.manifest
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -479,16 +479,18 @@
 @BINPATH@/components/nsPrompter.manifest
 @BINPATH@/components/nsPrompter.js
 #ifdef MOZ_SERVICES_SYNC
 @BINPATH@/components/SyncComponents.manifest
 @BINPATH@/components/Weave.js
 @BINPATH@/components/WeaveCrypto.manifest
 @BINPATH@/components/WeaveCrypto.js
 #endif
+@BINPATH@/components/servicesComponents.manifest
+@BINPATH@/components/cryptoComponents.manifest
 #ifdef MOZ_SERVICES_HEALTHREPORT
 @BINPATH@/components/HealthReportComponents.manifest
 @BINPATH@/components/HealthReportService.js
 #endif
 @BINPATH@/components/TelemetryPing.js
 @BINPATH@/components/TelemetryPing.manifest
 @BINPATH@/components/Webapps.js
 @BINPATH@/components/Webapps.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -472,16 +472,18 @@
 #ifdef MOZ_SERVICES_HEALTHREPORT
 @BINPATH@/components/HealthReportComponents.manifest
 @BINPATH@/components/HealthReportService.js
 #endif
 #ifdef MOZ_SERVICES_SYNC
 @BINPATH@/components/SyncComponents.manifest
 @BINPATH@/components/Weave.js
 #endif
+@BINPATH@/components/servicesComponents.manifest
+@BINPATH@/components/cryptoComponents.manifest
 @BINPATH@/components/TelemetryPing.js
 @BINPATH@/components/TelemetryPing.manifest
 @BINPATH@/components/messageWakeupService.js
 @BINPATH@/components/messageWakeupService.manifest
 @BINPATH@/components/SettingsManager.js
 @BINPATH@/components/SettingsManager.manifest
 @BINPATH@/components/Webapps.js
 @BINPATH@/components/Webapps.manifest
--- a/mobile/xul/installer/package-manifest.in
+++ b/mobile/xul/installer/package-manifest.in
@@ -429,16 +429,18 @@
 @BINPATH@/components/nsPrompter.manifest
 @BINPATH@/components/nsPrompter.js
 #ifdef MOZ_SERVICES_SYNC
 @BINPATH@/components/SyncComponents.manifest
 @BINPATH@/components/Weave.js
 @BINPATH@/components/WeaveCrypto.manifest
 @BINPATH@/components/WeaveCrypto.js
 #endif
+@BINPATH@/components/servicesComponents.manifest
+@BINPATH@/components/cryptoComponents.manifest
 #ifdef MOZ_SERVICES_HEALTHREPORT
 @BINPATH@/components/HealthReportComponents.manifest
 @BINPATH@/components/HealthReportService.js
 #endif
 @BINPATH@/components/TelemetryPing.js
 @BINPATH@/components/TelemetryPing.manifest
 
 @BINPATH@/components/TCPSocket.js
--- a/services/common/Makefile.in
+++ b/services/common/Makefile.in
@@ -25,16 +25,20 @@ modules := \
 testing_modules := \
   aitcserver.js \
   bagheeraserver.js \
   logging.js \
   storageserver.js \
   utils.js \
   $(NULL)
 
+EXTRA_COMPONENTS := \
+  servicesComponents.manifest \
+  $(NULL)
+
 TEST_DIRS += tests
 
 PREF_JS_EXPORTS = $(srcdir)/services-common.js
 
 MODULES_FILES := $(modules)
 MODULES_DEST = $(FINAL_TARGET)/modules/services-common
 INSTALL_TARGETS += MODULES
 
copy from services/sync/SyncComponents.manifest
copy to services/common/servicesComponents.manifest
--- a/services/sync/SyncComponents.manifest
+++ b/services/common/servicesComponents.manifest
@@ -1,27 +1,2 @@
-# WebappRT doesn't need these instructions, and they don't necessarily work
-# with it, but it does use a GRE directory that the GRE shares with Firefox,
-# so in order to prevent the instructions from being processed for WebappRT,
-# we need to restrict them to the applications that depend on them, i.e.:
-#
-#   b2g:            {3c2e2abc-06d4-11e1-ac3b-374f68613e61}
-#   browser:        {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-#   mobile/android: {aa3c5121-dab2-40e2-81ca-7ea25febc110}
-#   mobile/xul:     {a23983c0-fd0e-11dc-95ff-0800200c9a66}
-#   suite (comm):   {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-#   metro browser:  {99bceaaa-e3c6-48c1-b981-ef9b46b67d60}
-#
-# In theory we should do this for all these instructions, but in practice it is
-# sufficient to do it for the app-startup one, and the file is simpler that way.
-
-# Weave.js
-component {74b89fb0-f200-4ae8-a3ec-dd164117f6de} Weave.js
-contract @mozilla.org/weave/service;1 {74b89fb0-f200-4ae8-a3ec-dd164117f6de}
-category app-startup WeaveService service,@mozilla.org/weave/service;1 application={3c2e2abc-06d4-11e1-ac3b-374f68613e61} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110} application={a23983c0-fd0e-11dc-95ff-0800200c9a66} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={99bceaaa-e3c6-48c1-b981-ef9b46b67d60}
-component {d28f8a0b-95da-48f4-b712-caf37097be41} Weave.js
-contract @mozilla.org/network/protocol/about;1?what=sync-log {d28f8a0b-95da-48f4-b712-caf37097be41}
-
 # Register resource aliases
-# (Note, for tests these are also set up in addResourceAlias)
-resource services-sync resource://gre/modules/services-sync/
 resource services-common resource://gre/modules/services-common/
-resource services-crypto resource://gre/modules/services-crypto/
--- a/services/crypto/Makefile.in
+++ b/services/crypto/Makefile.in
@@ -11,16 +11,20 @@ include $(DEPTH)/config/autoconf.mk
 
 modules := \
   utils.js \
   WeaveCrypto.js \
   $(NULL)
 
 MODULE = services-crypto
 
+EXTRA_COMPONENTS := \
+  cryptoComponents.manifest \
+  $(NULL)
+
 CRYPTO_MODULE_FILES := $(addprefix modules/,$(modules))
 CRYPTO_MODULE_DEST = $(FINAL_TARGET)/modules/services-crypto
 INSTALL_TARGETS += CRYPTO_MODULE
 
 TEST_DIRS += tests
 
 DIRS += component
 
copy from services/sync/SyncComponents.manifest
copy to services/crypto/cryptoComponents.manifest
--- a/services/sync/SyncComponents.manifest
+++ b/services/crypto/cryptoComponents.manifest
@@ -1,27 +1,1 @@
-# WebappRT doesn't need these instructions, and they don't necessarily work
-# with it, but it does use a GRE directory that the GRE shares with Firefox,
-# so in order to prevent the instructions from being processed for WebappRT,
-# we need to restrict them to the applications that depend on them, i.e.:
-#
-#   b2g:            {3c2e2abc-06d4-11e1-ac3b-374f68613e61}
-#   browser:        {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-#   mobile/android: {aa3c5121-dab2-40e2-81ca-7ea25febc110}
-#   mobile/xul:     {a23983c0-fd0e-11dc-95ff-0800200c9a66}
-#   suite (comm):   {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-#   metro browser:  {99bceaaa-e3c6-48c1-b981-ef9b46b67d60}
-#
-# In theory we should do this for all these instructions, but in practice it is
-# sufficient to do it for the app-startup one, and the file is simpler that way.
-
-# Weave.js
-component {74b89fb0-f200-4ae8-a3ec-dd164117f6de} Weave.js
-contract @mozilla.org/weave/service;1 {74b89fb0-f200-4ae8-a3ec-dd164117f6de}
-category app-startup WeaveService service,@mozilla.org/weave/service;1 application={3c2e2abc-06d4-11e1-ac3b-374f68613e61} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110} application={a23983c0-fd0e-11dc-95ff-0800200c9a66} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={99bceaaa-e3c6-48c1-b981-ef9b46b67d60}
-component {d28f8a0b-95da-48f4-b712-caf37097be41} Weave.js
-contract @mozilla.org/network/protocol/about;1?what=sync-log {d28f8a0b-95da-48f4-b712-caf37097be41}
-
-# Register resource aliases
-# (Note, for tests these are also set up in addResourceAlias)
-resource services-sync resource://gre/modules/services-sync/
-resource services-common resource://gre/modules/services-common/
 resource services-crypto resource://gre/modules/services-crypto/
--- a/services/crypto/modules/WeaveCrypto.js
+++ b/services/crypto/modules/WeaveCrypto.js
@@ -52,17 +52,21 @@ WeaveCrypto.prototype = {
     },
 
     init : function() {
         try {
             // Preferences. Add observer so we get notified of changes.
             this.prefBranch = Services.prefs.getBranch("services.sync.log.");
             this.prefBranch.addObserver("cryptoDebug", this.observer, false);
             this.observer._self = this;
-            this.debug = this.prefBranch.getBoolPref("cryptoDebug");
+            try {
+              this.debug = this.prefBranch.getBoolPref("cryptoDebug");
+            } catch (x) {
+              this.debug = false;
+            }
 
             this.initNSS();
             this.initAlgorithmSettings();   // Depends on NSS.
             this.initIVSECItem();
             this.initSharedInts();
             this.initBuffers(INITIAL_BUFFER_SIZE);
         } catch (e) {
             this.log("init failed: " + e);
--- a/services/sync/SyncComponents.manifest
+++ b/services/sync/SyncComponents.manifest
@@ -18,10 +18,8 @@ component {74b89fb0-f200-4ae8-a3ec-dd164
 contract @mozilla.org/weave/service;1 {74b89fb0-f200-4ae8-a3ec-dd164117f6de}
 category app-startup WeaveService service,@mozilla.org/weave/service;1 application={3c2e2abc-06d4-11e1-ac3b-374f68613e61} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110} application={a23983c0-fd0e-11dc-95ff-0800200c9a66} application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} application={99bceaaa-e3c6-48c1-b981-ef9b46b67d60}
 component {d28f8a0b-95da-48f4-b712-caf37097be41} Weave.js
 contract @mozilla.org/network/protocol/about;1?what=sync-log {d28f8a0b-95da-48f4-b712-caf37097be41}
 
 # Register resource aliases
 # (Note, for tests these are also set up in addResourceAlias)
 resource services-sync resource://gre/modules/services-sync/
-resource services-common resource://gre/modules/services-common/
-resource services-crypto resource://gre/modules/services-crypto/