Bug 1524688: Part 23 - Convert TooltipTextProvider to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 29 Jan 2019 21:19:27 -0800
changeset 458996 bf6b18e23f69
parent 458995 dd89eb7e9b0d
child 458997 f4eaebbe2e0f
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 23 - Convert TooltipTextProvider to static registration. r=mconley
browser/installer/package-manifest.in
mobile/android/installer/package-manifest.in
toolkit/components/tooltiptext/TooltipTextProvider.js
toolkit/components/tooltiptext/TooltipTextProvider.jsm
toolkit/components/tooltiptext/TooltipTextProvider.manifest
toolkit/components/tooltiptext/components.conf
toolkit/components/tooltiptext/moz.build
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -196,18 +196,16 @@
 @RESPATH@/components/PageThumbsComponents.manifest
 @RESPATH@/components/crashmonitor.manifest
 @RESPATH@/components/nsCrashMonitor.js
 @RESPATH@/components/toolkitsearch.manifest
 #ifdef NIGHTLY_BUILD
 @RESPATH@/browser/components/payments.manifest
 @RESPATH@/browser/components/paymentUIService.js
 #endif
-@RESPATH@/components/TooltipTextProvider.js
-@RESPATH@/components/TooltipTextProvider.manifest
 @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
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -116,18 +116,16 @@
 @BINPATH@/components/WellKnownOpportunisticUtils.manifest
 @BINPATH@/components/mozProtocolHandler.js
 @BINPATH@/components/mozProtocolHandler.manifest
 #ifndef MOZ_GECKOVIEW_JAR
 @BINPATH@/components/nsDNSServiceDiscovery.manifest
 @BINPATH@/components/nsDNSServiceDiscovery.js
 #endif
 @BINPATH@/components/toolkitsearch.manifest
-@BINPATH@/components/TooltipTextProvider.js
-@BINPATH@/components/TooltipTextProvider.manifest
 
 @BINPATH@/components/extensions.manifest
 
 #ifndef MOZ_GECKOVIEW_JAR
 @BINPATH@/components/amContentHandler.js
 @BINPATH@/components/amWebAPI.js
 @BINPATH@/components/amInstallTrigger.js
 #ifndef RELEASE_OR_BETA
rename from toolkit/components/tooltiptext/TooltipTextProvider.js
rename to toolkit/components/tooltiptext/TooltipTextProvider.jsm
--- a/toolkit/components/tooltiptext/TooltipTextProvider.js
+++ b/toolkit/components/tooltiptext/TooltipTextProvider.jsm
@@ -1,13 +1,12 @@
 /* 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/. */
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function TooltipTextProvider() {}
 
 TooltipTextProvider.prototype = {
   getNodeText(tipElement, textOut, directionOut) {
     // Don't show the tooltip if the tooltip node is a document or browser.
     // Caller should ensure the node is in (composed) document.
@@ -141,10 +140,9 @@ TooltipTextProvider.prototype = {
       return false;
     });
   },
 
   classID: Components.ID("{f376627f-0bbc-47b8-887e-fc92574cc91f}"),
   QueryInterface: ChromeUtils.generateQI([Ci.nsITooltipTextProvider]),
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TooltipTextProvider]);
-
+var EXPORTED_SYMBOLS = ["TooltipTextProvider"];
deleted file mode 100644
--- a/toolkit/components/tooltiptext/TooltipTextProvider.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {f376627f-0bbc-47b8-887e-fc92574cc91f} TooltipTextProvider.js
-contract @mozilla.org/embedcomp/default-tooltiptextprovider;1 {f376627f-0bbc-47b8-887e-fc92574cc91f}
new file mode 100644
--- /dev/null
+++ b/toolkit/components/tooltiptext/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': '{f376627f-0bbc-47b8-887e-fc92574cc91f}',
+        'contract_ids': ['@mozilla.org/embedcomp/default-tooltiptextprovider;1'],
+        'jsm': 'resource://gre/modules/TooltipTextProvider.jsm',
+        'constructor': 'TooltipTextProvider',
+    },
+]
--- a/toolkit/components/tooltiptext/moz.build
+++ b/toolkit/components/tooltiptext/moz.build
@@ -1,15 +1,18 @@
 # -*- 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/.
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 
-EXTRA_COMPONENTS += [
-    'TooltipTextProvider.js',
-    'TooltipTextProvider.manifest',
+EXTRA_JS_MODULES += [
+    'TooltipTextProvider.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'General')