Bug 1524688: Part 63 - Convert HelperAppDlg to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 13:25:15 -0800
changeset 459034 c7c49f64048f
parent 459033 fb23a0271da0
child 459035 81dc12cc9257
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 63 - Convert HelperAppDlg to static registration. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D18473
browser/installer/package-manifest.in
toolkit/mozapps/downloads/HelperAppDlg.jsm
toolkit/mozapps/downloads/components.conf
toolkit/mozapps/downloads/moz.build
toolkit/mozapps/downloads/nsHelperAppDlg.js
toolkit/mozapps/downloads/nsHelperAppDlg.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -162,18 +162,16 @@
 ; JavaScript components
 @RESPATH@/browser/components/BrowserComponents.manifest
 @RESPATH@/browser/components/EnterprisePolicies.js
 @RESPATH@/browser/components/EnterprisePoliciesContent.js
 @RESPATH@/browser/components/EnterprisePolicies.manifest
 @RESPATH@/components/toolkitsearch.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
 @RESPATH@/components/ProcessSingleton.manifest
 @RESPATH@/components/HandlerService.manifest
 @RESPATH@/components/HandlerService.js
 #ifdef XP_MACOSX
rename from toolkit/mozapps/downloads/nsHelperAppDlg.js
rename to toolkit/mozapps/downloads/HelperAppDlg.jsm
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
+++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm
@@ -1,15 +1,14 @@
 /* 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 {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "EnableDelayHelper",
                                "resource://gre/modules/SharedPromptUtils.jsm");
 
 // /////////////////////////////////////////////////////////////////////////////
 // // Helper Functions
 
 /**
  * Determines if a given directory is able to be used to download to.
@@ -1083,9 +1082,9 @@ nsUnknownContentTypeDialog.prototype = {
   // Dump text (if debug is on).
   dump( text ) {
     if ( this.debug ) {
       dump( text );
     }
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsUnknownContentTypeDialog]);
+var EXPORTED_SYMBOLS = ["nsUnknownContentTypeDialog"];
new file mode 100644
--- /dev/null
+++ b/toolkit/mozapps/downloads/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': '{F68578EB-6EC2-4169-AE19-8C6243F0ABE1}',
+        'contract_ids': ['@mozilla.org/helperapplauncherdialog;1'],
+        'jsm': 'resource://gre/modules/HelperAppDlg.jsm',
+        'constructor': 'nsUnknownContentTypeDialog',
+    },
+]
--- a/toolkit/mozapps/downloads/moz.build
+++ b/toolkit/mozapps/downloads/moz.build
@@ -4,19 +4,19 @@
 # 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/.
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Downloads API')
 
 TEST_DIRS += ['tests']
 
-EXTRA_COMPONENTS += [
-    'nsHelperAppDlg.js',
-    'nsHelperAppDlg.manifest',
-]
-
 EXTRA_JS_MODULES += [
     'DownloadLastDir.jsm',
     'DownloadUtils.jsm',
+    'HelperAppDlg.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
deleted file mode 100644
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {F68578EB-6EC2-4169-AE19-8C6243F0ABE1} nsHelperAppDlg.js
-contract @mozilla.org/helperapplauncherdialog;1 {F68578EB-6EC2-4169-AE19-8C6243F0ABE1}