Bug 1524688: Part 26 - Convert TerminatorTelemetry to static registration. r=froydnj
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 29 Jan 2019 21:26:18 -0800
changeset 458999 fe583e7aae8d
parent 458998 18f156d6355a
child 459000 ff120b4eeb79
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)
reviewersfroydnj
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 26 - Convert TerminatorTelemetry to static registration. r=froydnj
browser/installer/package-manifest.in
toolkit/components/terminator/TerminatorTelemetry.jsm
toolkit/components/terminator/components.conf
toolkit/components/terminator/moz.build
toolkit/components/terminator/nsTerminatorTelemetry.js
toolkit/components/terminator/terminator.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -503,17 +503,16 @@ bin/libfreebl_32int64_3.so
 #endif
 #endif
 
 ; [ Ping Sender ]
 ;
 @BINPATH@/pingsender@BIN_SUFFIX@
 
 ; Shutdown Terminator
-@RESPATH@/components/nsTerminatorTelemetry.js
 @RESPATH@/components/terminator.manifest
 
 #ifdef LLVM_SYMBOLIZER
 @BINPATH@/@LLVM_SYMBOLIZER@
 ; On Windows, llvm-symbolizer depends on the MS DIA library.
 #ifdef WIN_DIA_SDK_BIN_DIR
 @BINPATH@/msdia140.dll
 #endif
rename from toolkit/components/terminator/nsTerminatorTelemetry.js
rename to toolkit/components/terminator/TerminatorTelemetry.jsm
--- a/toolkit/components/terminator/nsTerminatorTelemetry.js
+++ b/toolkit/components/terminator/TerminatorTelemetry.jsm
@@ -86,9 +86,9 @@ nsTerminatorTelemetry.prototype = {
       Services.obs.notifyObservers(null,
         "shutdown-terminator-telemetry-updated");
     })();
   },
 };
 
 // Module
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsTerminatorTelemetry]);
+var EXPORTED_SYMBOLS = ["nsTerminatorTelemetry"];
new file mode 100644
--- /dev/null
+++ b/toolkit/components/terminator/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': '{3f78ada1-cba2-442a-82dd-d5fb300ddea7}',
+        'contract_ids': ['@mozilla.org/toolkit/shutdown-terminator-telemetry;1'],
+        'jsm': 'resource://gre/modules/TerminatorTelemetry.jsm',
+        'constructor': 'nsTerminatorTelemetry',
+        'categories': {'profile-after-change': 'nsTerminatorTelemetry'},
+    },
+]
--- a/toolkit/components/terminator/moz.build
+++ b/toolkit/components/terminator/moz.build
@@ -13,13 +13,20 @@ SOURCES += [
     'nsTerminator.cpp',
 ]
 
 EXPORTS += [
     'nsTerminator.h',
 ]
 
 EXTRA_COMPONENTS += [
-    'nsTerminatorTelemetry.js',
     'terminator.manifest',
 ]
 
+EXTRA_JS_MODULES += [
+    'TerminatorTelemetry.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
+]
+
 FINAL_LIBRARY = 'xul'
--- a/toolkit/components/terminator/terminator.manifest
+++ b/toolkit/components/terminator/terminator.manifest
@@ -1,5 +1,1 @@
 category profile-after-change nsTerminator @mozilla.org/toolkit/shutdown-terminator;1
-
-component {3f78ada1-cba2-442a-82dd-d5fb300ddea7} nsTerminatorTelemetry.js
-contract @mozilla.org/toolkit/shutdown-terminator-telemetry;1 {3f78ada1-cba2-442a-82dd-d5fb300ddea7}
-category profile-after-change nsTerminatorTelemetry @mozilla.org/toolkit/shutdown-terminator-telemetry;1