Bug 1524688: Part 58 - Convert SlowScriptDebug to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 11:42:53 -0800
changeset 459029 92877cf4fe33
parent 459028 b4938f2ff8fd
child 459030 de0b9993bd5d
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 58 - Convert SlowScriptDebug to static registration. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D18468
browser/installer/package-manifest.in
dom/base/SlowScriptDebug.js
dom/base/SlowScriptDebug.jsm
dom/base/SlowScriptDebug.manifest
dom/base/components.conf
dom/base/moz.build
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -202,19 +202,16 @@
 #endif
 @RESPATH@/components/SyncComponents.manifest
 @RESPATH@/components/servicesComponents.manifest
 @RESPATH@/components/servicesSettings.manifest
 @RESPATH@/components/cryptoComponents.manifest
 
 @RESPATH@/components/Push.manifest
 
-@RESPATH@/components/SlowScriptDebug.manifest
-@RESPATH@/components/SlowScriptDebug.js
-
 ; Remote control protocol
 #ifdef ENABLE_MARIONETTE
 @RESPATH@/chrome/marionette@JAREXT@
 @RESPATH@/chrome/marionette.manifest
 @RESPATH@/components/marionette.manifest
 @RESPATH@/components/marionette.js
 @RESPATH@/defaults/pref/marionette.js
 #endif
rename from dom/base/SlowScriptDebug.js
rename to dom/base/SlowScriptDebug.jsm
--- a/dom/base/SlowScriptDebug.js
+++ b/dom/base/SlowScriptDebug.jsm
@@ -1,24 +1,20 @@
 /* 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/. */
 
 "use strict";
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
 function SlowScriptDebug() { }
 
 SlowScriptDebug.prototype = {
-  classID: Components.ID("{e740ddb4-18b4-4aac-8ae1-9b0f4320769d}"),
   classDescription: "Slow script debug handler",
-  contractID: "@mozilla.org/dom/slow-script-debug;1",
   QueryInterface: ChromeUtils.generateQI([Ci.nsISlowScriptDebug]),
 
   get activationHandler()   { return this._activationHandler; },
   set activationHandler(cb) { return this._activationHandler = cb; },
 
   get remoteActivationHandler()   { return this._remoteActivationHandler; },
   set remoteActivationHandler(cb) { return this._remoteActivationHandler = cb; },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SlowScriptDebug]);
+var EXPORTED_SYMBOLS = ["SlowScriptDebug"];
deleted file mode 100644
--- a/dom/base/SlowScriptDebug.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {e740ddb4-18b4-4aac-8ae1-9b0f4320769d} SlowScriptDebug.js
-contract @mozilla.org/dom/slow-script-debug;1 {e740ddb4-18b4-4aac-8ae1-9b0f4320769d}
--- a/dom/base/components.conf
+++ b/dom/base/components.conf
@@ -17,9 +17,15 @@ Classes = [
         'constructor': 'RandomSelector',
     },
     {
         'cid': '{2dc08eaf-6eef-4394-b1df-a3a927c1290b}',
         'contract_ids': ['@mozilla.org/ipc/processselector;1'],
         'jsm': 'resource://gre/modules/ProcessSelector.jsm',
         'constructor': 'MinTabSelector',
     },
+    {
+        'cid': '{e740ddb4-18b4-4aac-8ae1-9b0f4320769d}',
+        'contract_ids': ['@mozilla.org/dom/slow-script-debug;1'],
+        'jsm': 'resource://gre/modules/SlowScriptDebug.jsm',
+        'constructor': 'SlowScriptDebug',
+    },
 ]
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -447,26 +447,22 @@ SOURCES += [
 ]
 
 # Are we targeting x86-32 or x86-64?  If so, we want to include SSE2 code for
 # nsTextFragment.cpp
 if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += ['nsTextFragmentSSE2.cpp']
     SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
 
-EXTRA_COMPONENTS += [
-    'SlowScriptDebug.js',
-    'SlowScriptDebug.manifest',
-]
-
 EXTRA_JS_MODULES += [
     'ContentAreaDropListener.jsm',
     'DOMRequestHelper.jsm',
     'IndexedDBHelper.jsm',
     'ProcessSelector.jsm',
+    'SlowScriptDebug.jsm',
 ]
 
 XPCOM_MANIFESTS += [
     'components.conf',
 ]
 
 LOCAL_INCLUDES += [
     '../battery',