Bug 1524688: Part 39 - Convert ClearDataService to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 10:46:37 -0800
changeset 459011 1bb7dfbb9f48
parent 459010 56c61e0a1f45
child 459012 01c4d3edb1b0
push id111909
push usermaglione.k@gmail.com
push dateThu, 14 Feb 2019 02:30:40 +0000
treeherdermozilla-inbound@81dc12cc9257 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1524688
milestone67.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 1524688: Part 39 - Convert ClearDataService to static registration. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D18449
browser/installer/package-manifest.in
mobile/android/installer/package-manifest.in
toolkit/components/cleardata/ClearDataService.js
toolkit/components/cleardata/ClearDataService.jsm
toolkit/components/cleardata/ClearDataService.manifest
toolkit/components/cleardata/components.conf
toolkit/components/cleardata/moz.build
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -234,19 +234,16 @@
 @RESPATH@/components/Push.manifest
 
 @RESPATH@/components/ProcessSelector.js
 @RESPATH@/components/ProcessSelector.manifest
 
 @RESPATH@/components/SlowScriptDebug.manifest
 @RESPATH@/components/SlowScriptDebug.js
 
-@RESPATH@/components/ClearDataService.manifest
-@RESPATH@/components/ClearDataService.js
-
 ; Remote control protocol
 #ifdef ENABLE_MARIONETTE
 @RESPATH@/chrome/marionette@JAREXT@
 @RESPATH@/chrome/marionette.manifest
 @RESPATH@/components/marionette.manifest
 @RESPATH@/components/marionette.js
 @RESPATH@/defaults/pref/marionette.js
 #endif
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -135,19 +135,16 @@
 @BINPATH@/components/WebVTTParserWrapper.js
 
 #ifndef MOZ_GECKOVIEW_JAR
 #ifdef MOZ_UPDATER
 @BINPATH@/components/nsUpdateService.manifest
 #endif
 #endif
 
-@BINPATH@/components/ClearDataService.manifest
-@BINPATH@/components/ClearDataService.js
-
 @BINPATH@/components/ProcessSingleton.manifest
 @BINPATH@/components/HandlerService.manifest
 @BINPATH@/components/HandlerService.js
 @BINPATH@/components/contentAreaDropListener.manifest
 @BINPATH@/components/contentAreaDropListener.js
 @BINPATH@/components/servicesComponents.manifest
 @BINPATH@/components/servicesSettings.manifest
 @BINPATH@/components/RemoteSettingsComponents.js
rename from toolkit/components/cleardata/ClearDataService.js
rename to toolkit/components/cleardata/ClearDataService.jsm
--- a/toolkit/components/cleardata/ClearDataService.js
+++ b/toolkit/components/cleardata/ClearDataService.jsm
@@ -902,9 +902,9 @@ ClearDataService.prototype = Object.free
       // Let's collect the failure in resultFlags.
       return aHelper(c.cleaner).catch(() => { resultFlags |= c.flag; });
     });
     Promise.all(promises).then(() => { aCallback.onDataDeleted(resultFlags); });
     return Cr.NS_OK;
   },
 });
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ClearDataService]);
+var EXPORTED_SYMBOLS = ["ClearDataService"];
deleted file mode 100644
--- a/toolkit/components/cleardata/ClearDataService.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {0c06583d-7dd8-4293-b1a5-912205f779aa} ClearDataService.js
-contract @mozilla.org/clear-data-service;1 {0c06583d-7dd8-4293-b1a5-912205f779aa}
new file mode 100644
--- /dev/null
+++ b/toolkit/components/cleardata/components.conf
@@ -0,0 +1,14 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+Classes = [
+    {
+        'cid': '{0c06583d-7dd8-4293-b1a5-912205f779aa}',
+        'contract_ids': ['@mozilla.org/clear-data-service;1'],
+        'jsm': 'resource://gre/modules/ClearDataService.jsm',
+        'constructor': 'ClearDataService',
+    },
+]
--- a/toolkit/components/cleardata/moz.build
+++ b/toolkit/components/cleardata/moz.build
@@ -5,23 +5,23 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'nsIClearDataService.idl',
 ]
 
 XPIDL_MODULE = 'toolkit_cleardata'
 
-EXTRA_COMPONENTS += [
-    'ClearDataService.js',
-    'ClearDataService.manifest',
+EXTRA_JS_MODULES += [
+    'ClearDataService.jsm',
+    'ServiceWorkerCleanUp.jsm',
 ]
 
-EXTRA_JS_MODULES += [
-    'ServiceWorkerCleanUp.jsm',
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Data Sanitization')