Bug 1524688: Part 17 - Convert NetworkGeolocationProvider to static registration. r=jdm
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 29 Jan 2019 20:53:13 -0800
changeset 458990 911689ef9f33
parent 458989 28670fdc418d
child 458991 ea347d57d73a
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)
reviewersjdm
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 17 - Convert NetworkGeolocationProvider to static registration. r=jdm
browser/installer/package-manifest.in
dom/system/NetworkGeolocationProvider.js
dom/system/NetworkGeolocationProvider.jsm
dom/system/NetworkGeolocationProvider.manifest
dom/system/components.conf
dom/system/moz.build
mobile/android/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -202,18 +202,16 @@
 @RESPATH@/browser/components/paymentUIService.js
 #endif
 @RESPATH@/components/TooltipTextProvider.js
 @RESPATH@/components/TooltipTextProvider.manifest
 @RESPATH@/components/WebVTT.manifest
 @RESPATH@/components/WebVTTParserWrapper.js
 @RESPATH@/components/nsHelperAppDlg.manifest
 @RESPATH@/components/nsHelperAppDlg.js
-@RESPATH@/components/NetworkGeolocationProvider.manifest
-@RESPATH@/components/NetworkGeolocationProvider.js
 @RESPATH@/components/extensions.manifest
 #ifdef MOZ_UPDATER
 @RESPATH@/components/nsUpdateService.manifest
 #endif
 @RESPATH@/components/nsUpdateTimerManager.manifest
 @RESPATH@/components/nsUpdateTimerManager.js
 @RESPATH@/components/ProcessSingleton.manifest
 @RESPATH@/components/nsURLFormatter.manifest
rename from dom/system/NetworkGeolocationProvider.js
rename to dom/system/NetworkGeolocationProvider.jsm
--- a/dom/system/NetworkGeolocationProvider.js
+++ b/dom/system/NetworkGeolocationProvider.jsm
@@ -413,9 +413,9 @@ WifiGeoPositionProvider.prototype = {
     function notifyPositionUnavailable(listener) {
       if (listener) {
         listener.notifyError(POSITION_UNAVAILABLE);
       }
     }
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([WifiGeoPositionProvider]);
+var EXPORTED_SYMBOLS = ["WifiGeoPositionProvider"];
deleted file mode 100644
--- a/dom/system/NetworkGeolocationProvider.manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-component {77DA64D3-7458-4920-9491-86CC9914F904} NetworkGeolocationProvider.js
-contract @mozilla.org/geolocation/provider;1 {77DA64D3-7458-4920-9491-86CC9914F904}
-contract @mozilla.org/geolocation/mls-provider;1 {77DA64D3-7458-4920-9491-86CC9914F904}
new file mode 100644
--- /dev/null
+++ b/dom/system/components.conf
@@ -0,0 +1,17 @@
+# -*- 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': '{77DA64D3-7458-4920-9491-86CC9914F904}',
+        'contract_ids': [
+            '@mozilla.org/geolocation/provider;1',
+            '@mozilla.org/geolocation/mls-provider;1',
+        ],
+        'jsm': 'resource://gre/modules/NetworkGeolocationProvider.jsm',
+        'constructor': 'WifiGeoPositionProvider',
+    },
+]
--- a/dom/system/moz.build
+++ b/dom/system/moz.build
@@ -74,19 +74,22 @@ EXPORTS.mozilla += [
 ]
 
 UNIFIED_SOURCES += [
     'nsDeviceSensors.cpp',
     'nsOSPermissionRequestBase.cpp',
     'OSFileConstants.cpp',
 ]
 
-EXTRA_COMPONENTS += [
-    'NetworkGeolocationProvider.js',
-    'NetworkGeolocationProvider.manifest',
+EXTRA_JS_MODULES += [
+    'NetworkGeolocationProvider.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 # We fire the nsDOMDeviceAcceleration
 LOCAL_INCLUDES += [
     '/dom/base',
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -118,18 +118,16 @@
 @BINPATH@/components/mozProtocolHandler.manifest
 #ifndef MOZ_GECKOVIEW_JAR
 @BINPATH@/components/nsDNSServiceDiscovery.manifest
 @BINPATH@/components/nsDNSServiceDiscovery.js
 #endif
 @BINPATH@/components/toolkitsearch.manifest
 @BINPATH@/components/TooltipTextProvider.js
 @BINPATH@/components/TooltipTextProvider.manifest
-@BINPATH@/components/NetworkGeolocationProvider.manifest
-@BINPATH@/components/NetworkGeolocationProvider.js
 
 @BINPATH@/components/extensions.manifest
 
 #ifndef MOZ_GECKOVIEW_JAR
 @BINPATH@/components/amContentHandler.js
 @BINPATH@/components/amWebAPI.js
 @BINPATH@/components/amInstallTrigger.js
 #ifndef RELEASE_OR_BETA