Bug 1524688: Part 22 - Convert URLFormatter to static registration. r=aswan
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 29 Jan 2019 21:17:26 -0800
changeset 458995 dd89eb7e9b0d
parent 458994 4cbbb367ba0b
child 458996 bf6b18e23f69
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)
reviewersaswan
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 22 - Convert URLFormatter to static registration. r=aswan
browser/installer/package-manifest.in
mobile/android/installer/package-manifest.in
toolkit/components/urlformatter/URLFormatter.jsm
toolkit/components/urlformatter/components.conf
toolkit/components/urlformatter/moz.build
toolkit/components/urlformatter/nsURLFormatter.js
toolkit/components/urlformatter/nsURLFormatter.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -209,18 +209,16 @@
 @RESPATH@/components/nsHelperAppDlg.js
 @RESPATH@/components/extensions.manifest
 #ifdef MOZ_UPDATER
 @RESPATH@/components/nsUpdateService.manifest
 #endif
 @RESPATH@/components/nsUpdateTimerManager.manifest
 @RESPATH@/components/nsUpdateTimerManager.js
 @RESPATH@/components/ProcessSingleton.manifest
-@RESPATH@/components/nsURLFormatter.manifest
-@RESPATH@/components/nsURLFormatter.js
 @RESPATH@/components/PageThumbsStorageService.js
 @RESPATH@/components/mozProtocolHandler.js
 @RESPATH@/components/mozProtocolHandler.manifest
 @RESPATH@/components/nsDefaultCLH.manifest
 @RESPATH@/components/nsDefaultCLH.js
 @RESPATH@/components/ContentPrefService2.manifest
 @RESPATH@/components/ContentPrefService2.js
 @RESPATH@/components/nsContentDispatchChooser.manifest
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -146,18 +146,16 @@
 
 @BINPATH@/components/ClearDataService.manifest
 @BINPATH@/components/ClearDataService.js
 
 @BINPATH@/components/nsUpdateTimerManager.manifest
 @BINPATH@/components/nsUpdateTimerManager.js
 
 @BINPATH@/components/ProcessSingleton.manifest
-@BINPATH@/components/nsURLFormatter.manifest
-@BINPATH@/components/nsURLFormatter.js
 @BINPATH@/components/ContentPrefService2.manifest
 @BINPATH@/components/ContentPrefService2.js
 @BINPATH@/components/HandlerService.manifest
 @BINPATH@/components/HandlerService.js
 @BINPATH@/components/contentAreaDropListener.manifest
 @BINPATH@/components/contentAreaDropListener.js
 @BINPATH@/components/servicesComponents.manifest
 @BINPATH@/components/servicesSettings.manifest
rename from toolkit/components/urlformatter/nsURLFormatter.js
rename to toolkit/components/urlformatter/URLFormatter.jsm
--- a/toolkit/components/urlformatter/nsURLFormatter.js
+++ b/toolkit/components/urlformatter/URLFormatter.jsm
@@ -128,9 +128,9 @@ nsURLFormatterService.prototype = {
   trimSensitiveURLs: function uf_trimSensitiveURLs(aMsg) {
     // Only the google API key is sensitive for now.
     return AppConstants.MOZ_GOOGLE_API_KEY ? aMsg.replace(RegExp(AppConstants.MOZ_GOOGLE_API_KEY, "g"),
                                                  "[trimmed-google-api-key]")
                                   : aMsg;
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsURLFormatterService]);
+var EXPORTED_SYMBOLS = ["nsURLFormatterService"];
new file mode 100644
--- /dev/null
+++ b/toolkit/components/urlformatter/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': '{e6156350-2be8-11db-a98b-0800200c9a66}',
+        'contract_ids': ['@mozilla.org/toolkit/URLFormatterService;1'],
+        'jsm': 'resource://gre/modules/URLFormatter.jsm',
+        'constructor': 'nsURLFormatterService',
+    },
+]
--- a/toolkit/components/urlformatter/moz.build
+++ b/toolkit/components/urlformatter/moz.build
@@ -10,14 +10,17 @@ with Files('**'):
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 XPIDL_SOURCES += [
     'nsIURLFormatter.idl',
 ]
 
 XPIDL_MODULE = 'urlformatter'
 
-EXTRA_COMPONENTS += [
-    'nsURLFormatter.js',
-    'nsURLFormatter.manifest',
+EXTRA_JS_MODULES += [
+    'URLFormatter.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 DEFINES['OBJDIR'] = OBJDIR
deleted file mode 100644
--- a/toolkit/components/urlformatter/nsURLFormatter.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {e6156350-2be8-11db-a98b-0800200c9a66} nsURLFormatter.js
-contract @mozilla.org/toolkit/URLFormatterService;1 {e6156350-2be8-11db-a98b-0800200c9a66}