Bug 1524688: Part 47 - Convert RecordingCmdLine to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 11:17:02 -0800
changeset 459019 28105bf7bf6a
parent 459018 a9fb74beaf2b
child 459020 978ef5dac9db
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 47 - Convert RecordingCmdLine to static registration. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D18457
browser/installer/package-manifest.in
layout/tools/recording/RecordingCmdLine.jsm
layout/tools/recording/components.conf
layout/tools/recording/moz.build
layout/tools/recording/recording-cmdline.js
layout/tools/recording/recording-cmdline.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -205,18 +205,16 @@
 #ifdef XP_MACOSX
 @RESPATH@/browser/components/MacTouchBar.manifest
 @RESPATH@/browser/components/MacTouchBar.js
 #endif
 @RESPATH@/components/SyncComponents.manifest
 @RESPATH@/components/servicesComponents.manifest
 @RESPATH@/components/servicesSettings.manifest
 @RESPATH@/components/cryptoComponents.manifest
-@RESPATH@/components/recording-cmdline.js
-@RESPATH@/components/recording-cmdline.manifest
 @RESPATH@/components/htmlMenuBuilder.js
 @RESPATH@/components/htmlMenuBuilder.manifest
 
 @RESPATH@/components/NotificationStorage.js
 @RESPATH@/components/NotificationStorage.manifest
 @RESPATH@/components/Push.manifest
 
 @RESPATH@/components/ProcessSelector.js
rename from layout/tools/recording/recording-cmdline.js
rename to layout/tools/recording/RecordingCmdLine.jsm
--- a/layout/tools/recording/recording-cmdline.js
+++ b/layout/tools/recording/RecordingCmdLine.jsm
@@ -1,26 +1,18 @@
 /* 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 nsISupports                    = Ci.nsISupports;
-  
-const nsICommandLine                 = Ci.nsICommandLine;
 const nsICommandLineHandler          = Ci.nsICommandLineHandler;
-const nsISupportsString              = Ci.nsISupportsString;
 const nsIWindowWatcher               = Ci.nsIWindowWatcher;
 
 function RecordingCmdLineHandler() {}
 RecordingCmdLineHandler.prototype =
 {
-    classID: Components.ID('{86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}'),
-
     /* nsISupports */
     QueryInterface: ChromeUtils.generateQI([nsICommandLineHandler]),
 
     /* nsICommandLineHandler */
     handle : function handler_handle(cmdLine) {
         var args = { };
         args.wrappedJSObject = args;
         try {
@@ -66,9 +58,9 @@ RecordingCmdLineHandler.prototype =
                           "chrome,dialog=no,all", args);
         cmdLine.preventDefault = true;
     },
 
     helpInfo : "  --recording <file> Record drawing for a given URL.\n" +
                "  --recording-output <file> Specify destination file for a drawing recording.\n"
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RecordingCmdLineHandler]);
+var EXPORTED_SYMBOLS = ["RecordingCmdLineHandler"];
new file mode 100644
--- /dev/null
+++ b/layout/tools/recording/components.conf
@@ -0,0 +1,15 @@
+# -*- 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': '{86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}',
+        'contract_ids': ['@mozilla.org/commandlinehandler/general-startup;1?type=recording'],
+        'jsm': 'resource://gre/modules/RecordingCmdLine.jsm',
+        'constructor': 'RecordingCmdLineHandler',
+        'categories': {'command-line-handler': 'm-recording'},
+    },
+]
--- a/layout/tools/recording/moz.build
+++ b/layout/tools/recording/moz.build
@@ -1,12 +1,15 @@
 # -*- 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/.
 
-EXTRA_COMPONENTS += [
-    'recording-cmdline.js',
-    'recording-cmdline.manifest',
+EXTRA_JS_MODULES += [
+    'RecordingCmdLine.jsm',
 ]
 
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
+XPCOM_MANIFESTS += [
+    'components.conf',
+]
+
+JAR_MANIFESTS += ['jar.mn']
deleted file mode 100644
--- a/layout/tools/recording/recording-cmdline.manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-component {86FB70EC-90FF-45AD-A1C1-F77D3C1184E9} recording-cmdline.js
-contract @mozilla.org/commandlinehandler/general-startup;1?type=recording {86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}
-category command-line-handler m-recording @mozilla.org/commandlinehandler/general-startup;1?type=recording