Bug 1524688: Part 40 - Convert CaptiveDetect to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 10:48:56 -0800
changeset 459012 01c4d3edb1b0
parent 459011 1bb7dfbb9f48
child 459013 995ea188bc31
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 40 - Convert CaptiveDetect to static registration. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D18450
browser/installer/package-manifest.in
mobile/android/installer/package-manifest.in
toolkit/components/captivedetect/CaptiveDetect.jsm
toolkit/components/captivedetect/CaptivePortalDetectComponents.manifest
toolkit/components/captivedetect/captivedetect.js
toolkit/components/captivedetect/components.conf
toolkit/components/captivedetect/moz.build
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -213,18 +213,16 @@
 @RESPATH@/components/HandlerService.js
 #ifdef XP_MACOSX
 @RESPATH@/browser/components/MacTouchBar.manifest
 @RESPATH@/browser/components/MacTouchBar.js
 #endif
 @RESPATH@/components/SyncComponents.manifest
 @RESPATH@/components/FxAccountsComponents.manifest
 @RESPATH@/components/FxAccountsPush.js
-@RESPATH@/components/CaptivePortalDetectComponents.manifest
-@RESPATH@/components/captivedetect.js
 @RESPATH@/components/servicesComponents.manifest
 @RESPATH@/components/servicesSettings.manifest
 @RESPATH@/components/RemoteSettingsComponents.js
 @RESPATH@/components/cryptoComponents.manifest
 @RESPATH@/components/recording-cmdline.js
 @RESPATH@/components/recording-cmdline.manifest
 @RESPATH@/components/htmlMenuBuilder.js
 @RESPATH@/components/htmlMenuBuilder.manifest
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -147,19 +147,16 @@
 @BINPATH@/components/contentAreaDropListener.js
 @BINPATH@/components/servicesComponents.manifest
 @BINPATH@/components/servicesSettings.manifest
 @BINPATH@/components/RemoteSettingsComponents.js
 
 @BINPATH@/components/htmlMenuBuilder.js
 @BINPATH@/components/htmlMenuBuilder.manifest
 
-@BINPATH@/components/CaptivePortalDetectComponents.manifest
-@BINPATH@/components/captivedetect.js
-
 #if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
 @BINPATH@/components/TestInterfaceJS.js
 @BINPATH@/components/TestInterfaceJS.manifest
 @BINPATH@/components/TestInterfaceJSMaplike.js
 #endif
 
 @BINPATH@/components/nsAsyncShutdown.manifest
 @BINPATH@/components/nsAsyncShutdown.js
rename from toolkit/components/captivedetect/captivedetect.js
rename to toolkit/components/captivedetect/CaptiveDetect.jsm
--- a/toolkit/components/captivedetect/captivedetect.js
+++ b/toolkit/components/captivedetect/CaptiveDetect.jsm
@@ -437,18 +437,19 @@ CaptivePortalDetector.prototype = {
 
         debug("remove pending request #" + i + ", remaining " + this._requestQueue.length);
         break;
       }
     }
   },
 };
 
+/* globals debug: true */
 var debug;
 if (DEBUG) {
   debug = function(s) {
     dump("-*- CaptivePortalDetector component: " + s + "\n");
   };
 } else {
   debug = function(s) {};
 }
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CaptivePortalDetector]);
+var EXPORTED_SYMBOLS = ["CaptivePortalDetector"];
deleted file mode 100644
--- a/toolkit/components/captivedetect/CaptivePortalDetectComponents.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {d9cd00ba-aa4d-47b1-8792-b1fe0cd35060} captivedetect.js
-contract @mozilla.org/toolkit/captive-detector;1 {d9cd00ba-aa4d-47b1-8792-b1fe0cd35060}
new file mode 100644
--- /dev/null
+++ b/toolkit/components/captivedetect/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': '{d9cd00ba-aa4d-47b1-8792-b1fe0cd35060}',
+        'contract_ids': ['@mozilla.org/toolkit/captive-detector;1'],
+        'jsm': 'resource://gre/modules/CaptiveDetect.jsm',
+        'constructor': 'CaptivePortalDetector',
+    },
+]
--- a/toolkit/components/captivedetect/moz.build
+++ b/toolkit/components/captivedetect/moz.build
@@ -10,13 +10,15 @@ with Files('**'):
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
 XPIDL_SOURCES += [
     'nsICaptivePortalDetector.idl',
 ]
 
 XPIDL_MODULE = 'captivedetect'
 
-EXTRA_COMPONENTS += [
-    'captivedetect.js',
-    'CaptivePortalDetectComponents.manifest',
+EXTRA_JS_MODULES += [
+    'CaptiveDetect.jsm',
 ]
 
+XPCOM_MANIFESTS += [
+    'components.conf',
+]