Bug 1524688: Part 55 - Convert BrowserElementParent to static registration. r=mconley
☠☠ backed out by 3b1b94e39795 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Wed, 30 Jan 2019 11:36:13 -0800
changeset 459026 6c63bc240972
parent 459025 0ad5465eace1
child 459027 230d2feaf941
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 55 - Convert BrowserElementParent to static registration. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D18465
browser/installer/package-manifest.in
dom/browser-element/BrowserElementParent.js
dom/browser-element/BrowserElementParent.jsm
dom/browser-element/BrowserElementParent.manifest
dom/browser-element/components.conf
dom/browser-element/moz.build
mobile/android/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -155,18 +155,16 @@
 @BINPATH@/Accessible.tlb
 @BINPATH@/AccessibleHandler.dll
 @BINPATH@/AccessibleMarshal.dll
 @BINPATH@/IA2Marshal.dll
 #endif
 #endif
 
 ; JavaScript components
-@RESPATH@/components/BrowserElementParent.manifest
-@RESPATH@/components/BrowserElementParent.js
 @RESPATH@/browser/components/BrowserComponents.manifest
 @RESPATH@/browser/components/devtools-startup.manifest
 @RESPATH@/browser/components/devtools-startup.js
 @RESPATH@/browser/components/aboutdebugging-registration.js
 @RESPATH@/browser/components/aboutdebugging.manifest
 #ifdef NIGHTLY_BUILD
 @RESPATH@/browser/components/aboutdebugging-new-registration.js
 @RESPATH@/browser/components/aboutdebugging-new.manifest
rename from dom/browser-element/BrowserElementParent.js
rename to dom/browser-element/BrowserElementParent.jsm
--- a/dom/browser-element/BrowserElementParent.js
+++ b/dom/browser-element/BrowserElementParent.jsm
@@ -5,17 +5,16 @@
 "use strict";
 
 /* BrowserElementParent injects script to listen for certain events in the
  * child.  We then listen to messages from the child script and take
  * appropriate action here in the parent.
  */
 
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 const {BrowserElementPromptService} = ChromeUtils.import("resource://gre/modules/BrowserElementPromptService.jsm");
 
 function debug(msg) {
   //dump("BrowserElementParent - " + msg + "\n");
 }
 
 function getIntPref(prefName, def) {
   try {
@@ -617,9 +616,9 @@ BrowserElementParent.prototype = {
       break;
     default:
       debug('Unknown topic: ' + topic);
       break;
     };
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([BrowserElementParent]);
+var EXPORTED_SYMBOLS = ["BrowserElementParent"];
deleted file mode 100644
--- a/dom/browser-element/BrowserElementParent.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {9f171ac4-0939-4ef8-b360-3408aedc3060} BrowserElementParent.js
-contract @mozilla.org/dom/browser-element-api;1 {9f171ac4-0939-4ef8-b360-3408aedc3060}
new file mode 100644
--- /dev/null
+++ b/dom/browser-element/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': '{9f171ac4-0939-4ef8-b360-3408aedc3060}',
+        'contract_ids': ['@mozilla.org/dom/browser-element-api;1'],
+        'jsm': 'resource://gre/modules/BrowserElementParent.jsm',
+        'constructor': 'BrowserElementParent',
+    },
+]
--- a/dom/browser-element/moz.build
+++ b/dom/browser-element/moz.build
@@ -16,23 +16,23 @@ SOURCES += [
 ]
 
 XPIDL_SOURCES += [
     'nsIBrowserElementAPI.idl',
 ]
 
 XPIDL_MODULE = 'browser-element'
 
-EXTRA_COMPONENTS += [
-    'BrowserElementParent.js',
-    'BrowserElementParent.manifest',
+EXTRA_JS_MODULES += [
+    'BrowserElementParent.jsm',
+    'BrowserElementPromptService.jsm',
 ]
 
-EXTRA_JS_MODULES += [
-    'BrowserElementPromptService.jsm',
+XPCOM_MANIFESTS += [
+    'components.conf',
 ]
 
 LOCAL_INCLUDES += [
     '/dom/html',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -99,18 +99,16 @@
 
 ; [Components]
 @BINPATH@/components/components.manifest
 
 ; JavaScript components
 #ifdef MOZ_ANDROID_GCM
 @BINPATH@/components/Push.manifest
 #endif
-@BINPATH@/components/BrowserElementParent.manifest
-@BINPATH@/components/BrowserElementParent.js
 @BINPATH@/components/toolkitsearch.manifest
 
 @BINPATH@/components/extensions.manifest
 
 #ifndef MOZ_GECKOVIEW_JAR
 @BINPATH@/components/amContentHandler.js
 @BINPATH@/components/amWebAPI.js
 @BINPATH@/components/amInstallTrigger.js