Bug 1524688: Part 60 - Convert PaymentUIService to static registration. r=MattN
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 11:56:05 -0800
changeset 459031 9e9ec7de4160
parent 459030 de0b9993bd5d
child 459032 0c1d1248e59e
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)
reviewersMattN
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 60 - Convert PaymentUIService to static registration. r=MattN Differential Revision: https://phabricator.services.mozilla.com/D18470
browser/components/payments/PaymentUIService.jsm
browser/components/payments/components.conf
browser/components/payments/moz.build
browser/components/payments/paymentUIService.js
browser/components/payments/payments.manifest
browser/installer/package-manifest.in
rename from browser/components/payments/paymentUIService.js
rename to browser/components/payments/PaymentUIService.jsm
--- a/browser/components/payments/paymentUIService.js
+++ b/browser/components/payments/PaymentUIService.jsm
@@ -296,9 +296,9 @@ PaymentUIService.prototype = {
       case "SwapDocShells": {
         this._moveDialogToNewBrowser(event.target, event.detail);
         break;
       }
     }
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PaymentUIService]);
+var EXPORTED_SYMBOLS = ["PaymentUIService"];
new file mode 100644
--- /dev/null
+++ b/browser/components/payments/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': '{01f8bd55-9017-438b-85ec-7c15d2b35cdc}',
+        'contract_ids': ['@mozilla.org/dom/payments/payment-ui-service;1'],
+        'jsm': 'resource:///modules/PaymentUIService.jsm',
+        'constructor': 'PaymentUIService',
+    },
+]
--- a/browser/components/payments/moz.build
+++ b/browser/components/payments/moz.build
@@ -4,19 +4,22 @@
 # 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/.
 
 BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'WebPayments UI')
 
-EXTRA_COMPONENTS += [
-    'payments.manifest',
-    'paymentUIService.js',
+EXTRA_JS_MODULES += [
+    'PaymentUIService.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
 
 MOCHITEST_MANIFESTS += [
     'test/mochitest/formautofill/mochitest.ini',
     'test/mochitest/mochitest.ini',
 ]
deleted file mode 100644
--- a/browser/components/payments/payments.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {01f8bd55-9017-438b-85ec-7c15d2b35cdc} paymentUIService.js
-contract @mozilla.org/dom/payments/payment-ui-service;1 {01f8bd55-9017-438b-85ec-7c15d2b35cdc}
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -162,20 +162,16 @@
 ; JavaScript components
 @RESPATH@/browser/components/BrowserComponents.manifest
 @RESPATH@/browser/components/aboutNewTabService.js
 @RESPATH@/browser/components/NewTabComponents.manifest
 @RESPATH@/browser/components/EnterprisePolicies.js
 @RESPATH@/browser/components/EnterprisePoliciesContent.js
 @RESPATH@/browser/components/EnterprisePolicies.manifest
 @RESPATH@/components/toolkitsearch.manifest
-#ifdef NIGHTLY_BUILD
-@RESPATH@/browser/components/payments.manifest
-@RESPATH@/browser/components/paymentUIService.js
-#endif
 @RESPATH@/components/WebVTT.manifest
 @RESPATH@/components/WebVTTParserWrapper.js
 @RESPATH@/components/nsHelperAppDlg.manifest
 @RESPATH@/components/nsHelperAppDlg.js
 @RESPATH@/components/extensions.manifest
 #ifdef MOZ_UPDATER
 @RESPATH@/components/nsUpdateService.manifest
 #endif