Bug 1524688: Part 29 - Convert RemoteWebNavigation to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 10:24:11 -0800
changeset 459001 2bd48db9cd0f
parent 459000 ff120b4eeb79
child 459002 c9846136d105
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 29 - Convert RemoteWebNavigation to static registration. r=mconley
browser/installer/package-manifest.in
mobile/android/installer/package-manifest.in
toolkit/components/remotebrowserutils/RemoteWebNavigation.js
toolkit/components/remotebrowserutils/RemoteWebNavigation.jsm
toolkit/components/remotebrowserutils/components.conf
toolkit/components/remotebrowserutils/moz.build
toolkit/components/remotebrowserutils/remotebrowserutils.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -238,19 +238,16 @@
 @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/remotebrowserutils.manifest
-@RESPATH@/components/RemoteWebNavigation.js
-
 @RESPATH@/components/ProcessSelector.js
 @RESPATH@/components/ProcessSelector.manifest
 
 @RESPATH@/components/SlowScriptDebug.manifest
 @RESPATH@/components/SlowScriptDebug.js
 
 @RESPATH@/components/ClearDataService.manifest
 @RESPATH@/components/ClearDataService.js
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -268,19 +268,16 @@
 ; [Crash Reporter]
 ; CrashService is not used on Android but the ini files are required for L10N
 ; strings, see bug 1191351.
 #ifdef MOZ_CRASHREPORTER
 @BINPATH@/crashreporter.ini
 @BINPATH@/crashreporter-override.ini
 #endif
 
-@BINPATH@/components/RemoteWebNavigation.js
-@BINPATH@/components/remotebrowserutils.manifest
-
 [mobile]
 @BINPATH@/chrome/geckoview@JAREXT@
 @BINPATH@/chrome/geckoview.manifest
 
 #ifdef MOZ_GECKOVIEW_JAR
 @BINPATH@/components/GeckoView.manifest
 @BINPATH@/components/GeckoViewExternalAppService.js
 @BINPATH@/components/GeckoViewPrompt.js
rename from toolkit/components/remotebrowserutils/RemoteWebNavigation.js
rename to toolkit/components/remotebrowserutils/RemoteWebNavigation.jsm
--- a/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/RemoteWebNavigation.jsm
@@ -1,19 +1,15 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 // 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");
-
 ChromeUtils.defineModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "NetUtil",
-  "resource://gre/modules/NetUtil.jsm");
 ChromeUtils.defineModuleGetter(this, "Utils",
   "resource://gre/modules/sessionstore/Utils.jsm");
 ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "E10SUtils",
   "resource://gre/modules/E10SUtils.jsm");
 
 function makeURI(url) {
@@ -152,9 +148,9 @@ RemoteWebNavigation.prototype = {
     try {
       this._browser.messageManager.sendAsyncMessage(aMessage, aData);
     } catch (e) {
       Cu.reportError(e);
     }
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RemoteWebNavigation]);
+var EXPORTED_SYMBOLS = ["RemoteWebNavigation"];
new file mode 100644
--- /dev/null
+++ b/toolkit/components/remotebrowserutils/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': '{4b56964e-cdf3-4bb8-830c-0e2dad3f4ebd}',
+        'contract_ids': ['@mozilla.org/remote-web-navigation;1'],
+        'jsm': 'resource://gre/modules/RemoteWebNavigation.jsm',
+        'constructor': 'RemoteWebNavigation',
+        'processes': ProcessSelector.MAIN_PROCESS_ONLY,
+    },
+]
--- a/toolkit/components/remotebrowserutils/moz.build
+++ b/toolkit/components/remotebrowserutils/moz.build
@@ -2,14 +2,17 @@
 # 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/.
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Document Navigation')
 
-EXTRA_COMPONENTS += [
-    'remotebrowserutils.manifest',
-    'RemoteWebNavigation.js',
+EXTRA_JS_MODULES += [
+    'RemoteWebNavigation.jsm',
+]
+
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
deleted file mode 100644
--- a/toolkit/components/remotebrowserutils/remotebrowserutils.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {4b56964e-cdf3-4bb8-830c-0e2dad3f4ebd} RemoteWebNavigation.js process=main
-contract @mozilla.org/remote-web-navigation;1 {4b56964e-cdf3-4bb8-830c-0e2dad3f4ebd} process=main
\ No newline at end of file