Registration changes for services/sync and services/crypto required from bug 568691, landing on a CLOSED TREE to fix mobile bustage.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 01 Jul 2010 15:08:13 -0400
changeset 47095 05b326ca03969c57f8fe0fff7975740102df221d
parent 47094 836fd3f8feba673e861c2cf86bd58fb6977b0abe
child 47096 2c381fcd78a79de65923458510a54d406695cf16
push id14224
push userbsmedberg@mozilla.com
push dateThu, 01 Jul 2010 19:14:51 +0000
treeherdermozilla-central@05b326ca0396 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs568691
milestone2.0b2pre
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
Registration changes for services/sync and services/crypto required from bug 568691, landing on a CLOSED TREE to fix mobile bustage.
services/crypto/Makefile.in
services/crypto/WeaveCrypto.js
services/crypto/WeaveCrypto.manifest
services/sync/FormNotifier.js
services/sync/Makefile.in
services/sync/SyncComponents.manifest
services/sync/Weave.js
--- a/services/crypto/Makefile.in
+++ b/services/crypto/Makefile.in
@@ -46,11 +46,12 @@ MODULE = services-crypto
 XPIDL_MODULE = services-crypto
 
 XPIDLSRCS = \
   IWeaveCrypto.idl \
   $(NULL)
 
 EXTRA_COMPONENTS = \
   WeaveCrypto.js \
+  WeaveCrypto.manifest \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/services/crypto/WeaveCrypto.js
+++ b/services/crypto/WeaveCrypto.js
@@ -46,18 +46,16 @@ try {
 }
 catch(ex) {}
 
 function WeaveCrypto() {
     this.init();
 }
 
 WeaveCrypto.prototype = {
-    classDescription: "WeaveCrypto",
-    contractID: "@labs.mozilla.com/Weave/Crypto;2",
     classID: Components.ID("{7fa20841-c90e-4432-a1a1-ba3b20cb6b37}"),
     QueryInterface: XPCOMUtils.generateQI([Ci.IWeaveCrypto]),
 
     prefBranch : null,
     debug      : true,  // services.sync.log.cryptoDebug
     nss        : null,
     nss_t      : null,
 
@@ -1120,12 +1118,9 @@ WeaveCrypto.prototype = {
             if (ivParam && !ivParam.isNull())
                 this.nss.SECITEM_FreeItem(ivParam, true);
             if (pbeKey && !pbeKey.isNull())
                 this.nss.PK11_FreeSymKey(pbeKey);
         }
     }
 };
 
-let component = typeof Services == "undefined" || typeof ctypes == "undefined" ? [] : [WeaveCrypto];
-function NSGetModule (compMgr, fileSpec) {
-    return XPCOMUtils.generateModule(component);
-}
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([WeaveCrypto]);
new file mode 100644
--- /dev/null
+++ b/services/crypto/WeaveCrypto.manifest
@@ -0,0 +1,2 @@
+component {7fa20841-c90e-4432-a1a1-ba3b20cb6b37} WeaveCrypto.js
+contract @labs.mozilla.com/Weave/Crypto;2 {7fa20841-c90e-4432-a1a1-ba3b20cb6b37}
--- a/services/sync/FormNotifier.js
+++ b/services/sync/FormNotifier.js
@@ -51,9 +51,9 @@ function FormNotifier() {
 FormNotifier.prototype = {
   classDescription: "Form Notifier Wrapper",
   contractID: "@mozilla.org/satchel/form-history;1",
   classID: Components.ID("{be5a097b-6ee6-4c6a-8eca-6bce87d570e9}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormHistory2]),
 };
 
 let components = [FormNotifier];
-function NSGetModule(compMgr, fileSpec) XPCOMUtils.generateModule(components);
+const NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/services/sync/Makefile.in
+++ b/services/sync/Makefile.in
@@ -40,16 +40,17 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = locales
 
 EXTRA_COMPONENTS = \
+  SyncComponents.manifest \
   FormNotifier.js \
   Weave.js \
   $(NULL)
 
 PREF_JS_EXPORTS = $(srcdir)/services-sync.js
 
 libs::
 	$(PYTHON) $(topsrcdir)/config/nsinstall.py $(srcdir)/modules/* $(FINAL_TARGET)/modules/services-sync
new file mode 100644
--- /dev/null
+++ b/services/sync/SyncComponents.manifest
@@ -0,0 +1,12 @@
+# FormNotifier.js
+component {be5a097b-6ee6-4c6a-8eca-6bce87d570e9} FormNotifier.js
+contract @mozilla.org/satchel/form-history;1 {be5a097b-6ee6-4c6a-8eca-6bce87d570e9}
+
+# 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
+component {d28f8a0b-95da-48f4-b712-caf37097be41} Weave.js
+contract @mozilla.org/network/protocol/about;1?what=sync-log {d28f8a0b-95da-48f4-b712-caf37097be41}
+component {a08ee179-df50-48e0-9c87-79e4dd5caeb1} Weave.js
+contract @mozilla.org/network/protocol/about;1?what=sync-log.1 {a08ee179-df50-48e0-9c87-79e4dd5caeb1}
--- a/services/sync/Weave.js
+++ b/services/sync/Weave.js
@@ -39,20 +39,17 @@ const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function WeaveService() {
   this.wrappedJSObject = this;
 }
 WeaveService.prototype = {
-  classDescription: "Weave Service",
-  contractID: "@mozilla.org/weave/service;1",
   classID: Components.ID("{74b89fb0-f200-4ae8-a3ec-dd164117f6de}"),
-  _xpcom_categories: [{ category: "app-startup", service: true }],
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference]),
 
   observe: function BSS__observe(subject, topic, data) {
     switch (topic) {
     case "app-startup":
       let os = Cc["@mozilla.org/observer-service;1"].
@@ -90,18 +87,16 @@ WeaveService.prototype = {
 
     let aliasURI = ioService.newFileURI(file);
     resProt.setSubstitution("services-sync", aliasURI);
   }
 };
 
 function AboutWeaveLog() {}
 AboutWeaveLog.prototype = {
-  classDescription: "about:sync-log",
-  contractID: "@mozilla.org/network/protocol/about;1?what=sync-log",
   classID: Components.ID("{d28f8a0b-95da-48f4-b712-caf37097be41}"),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule,
                                          Ci.nsISupportsWeakReference]),
 
   getURIFlags: function(aURI) {
     return 0;
   },
@@ -118,18 +113,16 @@ AboutWeaveLog.prototype = {
     let ch = ios.newChannel(ios.newFileURI(file).spec, null, null);
     ch.originalURI = aURI;
     return ch;
   }
 };
 
 function AboutWeaveLog1() {}
 AboutWeaveLog1.prototype = {
-  classDescription: "about:sync-log.1",
-  contractID: "@mozilla.org/network/protocol/about;1?what=sync-log.1",
   classID: Components.ID("{a08ee179-df50-48e0-9c87-79e4dd5caeb1}"),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule,
                                          Ci.nsISupportsWeakReference]),
 
   getURIFlags: function(aURI) {
     return 0;
   },