mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 1824605 - Convert toolkit/components/processsingleton/ to ES modules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D173648
This commit is contained in:
parent
38b10eafda
commit
dbae17218c
@ -32,8 +32,8 @@ const startupPhases = {
|
||||
"resource:///modules/StartupRecorder.sys.mjs",
|
||||
"resource://gre/modules/AppConstants.sys.mjs",
|
||||
"resource://gre/modules/ActorManagerParent.sys.mjs",
|
||||
"resource://gre/modules/CustomElementsListener.jsm",
|
||||
"resource://gre/modules/MainProcessSingleton.jsm",
|
||||
"resource://gre/modules/CustomElementsListener.sys.mjs",
|
||||
"resource://gre/modules/MainProcessSingleton.sys.mjs",
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs",
|
||||
]),
|
||||
},
|
||||
|
@ -23,7 +23,7 @@ const { onSpellCheck } = ChromeUtils.importESModule(
|
||||
);
|
||||
|
||||
// This will load chrome Custom Elements inside chrome documents:
|
||||
ChromeUtils.import("resource://gre/modules/CustomElementsListener.jsm");
|
||||
ChromeUtils.importESModule("resource://gre/modules/CustomElementsListener.sys.mjs");
|
||||
|
||||
var gBrowserIsRemote;
|
||||
var gHaveCanvasSnapshot = false;
|
||||
|
@ -10,7 +10,9 @@ const { ExtensionUtils } = ChromeUtils.import(
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
// Windowless browsers can create documents that rely on XUL Custom Elements:
|
||||
ChromeUtils.import("resource://gre/modules/CustomElementsListener.jsm");
|
||||
ChromeUtils.importESModule(
|
||||
"resource://gre/modules/CustomElementsListener.sys.mjs"
|
||||
);
|
||||
|
||||
// Need to import ActorManagerParent.sys.mjs so that the actors are initialized
|
||||
// before running extension XPCShell tests.
|
||||
|
@ -3,8 +3,6 @@
|
||||
* 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/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = [];
|
||||
|
||||
// Set up Custom Elements for XUL and XHTML documents before anything else
|
||||
// happens. Anything loaded here should be considered part of core XUL functionality.
|
||||
// Any window-specific elements can be registered via <script> tags at the
|
@ -2,9 +2,7 @@
|
||||
* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
function MainProcessSingleton() {}
|
||||
export function MainProcessSingleton() {}
|
||||
MainProcessSingleton.prototype = {
|
||||
classID: Components.ID("{0636a680-45cb-11e4-916c-0800200c9a66}"),
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
@ -16,7 +14,9 @@ MainProcessSingleton.prototype = {
|
||||
switch (topic) {
|
||||
case "app-startup": {
|
||||
// Imported for side-effects.
|
||||
ChromeUtils.import("resource://gre/modules/CustomElementsListener.jsm");
|
||||
ChromeUtils.importESModule(
|
||||
"resource://gre/modules/CustomElementsListener.sys.mjs"
|
||||
);
|
||||
|
||||
Services.ppmm.loadProcessScript(
|
||||
"chrome://global/content/process-content.js",
|
||||
@ -27,5 +27,3 @@ MainProcessSingleton.prototype = {
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var EXPORTED_SYMBOLS = ["MainProcessSingleton"];
|
@ -8,7 +8,7 @@ Classes = [
|
||||
{
|
||||
'cid': '{0636a680-45cb-11e4-916c-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/main-process-singleton;1'],
|
||||
'jsm': 'resource://gre/modules/MainProcessSingleton.jsm',
|
||||
'esModule': 'resource://gre/modules/MainProcessSingleton.sys.mjs',
|
||||
'constructor': 'MainProcessSingleton',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
|
@ -12,8 +12,8 @@ EXTRA_COMPONENTS += [
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
"CustomElementsListener.jsm",
|
||||
"MainProcessSingleton.jsm",
|
||||
"CustomElementsListener.sys.mjs",
|
||||
"MainProcessSingleton.sys.mjs",
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
|
Loading…
x
Reference in New Issue
Block a user