зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1524688: Part 7 - Convert process singletons to static registration r=mconley
--HG-- rename : toolkit/components/processsingleton/ContentProcessSingleton.js => toolkit/components/processsingleton/ContentProcessSingleton.jsm rename : toolkit/components/processsingleton/MainProcessSingleton.js => toolkit/components/processsingleton/MainProcessSingleton.jsm extra : source : 5ce5986068f031ac17eb43ff278d30b81acdb73c
This commit is contained in:
Родитель
dc1970f435
Коммит
f34cca34b0
|
@ -27,8 +27,6 @@ const startupPhases = {
|
|||
// eg. from BrowserGlue.jsm' _onFirstWindowLoaded method).
|
||||
"before profile selection": {whitelist: {
|
||||
components: new Set([
|
||||
"MainProcessSingleton.js",
|
||||
|
||||
// Bugs to fix: The following components shouldn't be initialized that early.
|
||||
"PushComponents.js", // bug 1369436
|
||||
]),
|
||||
|
@ -38,6 +36,7 @@ const startupPhases = {
|
|||
"resource://gre/modules/ActorManagerParent.jsm",
|
||||
"resource://gre/modules/CustomElementsListener.jsm",
|
||||
"resource://gre/modules/ExtensionUtils.jsm",
|
||||
"resource://gre/modules/MainProcessSingleton.jsm",
|
||||
"resource://gre/modules/XPCOMUtils.jsm",
|
||||
"resource://gre/modules/Services.jsm",
|
||||
]),
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
const kDumpAllStacks = false;
|
||||
|
||||
const whitelist = {
|
||||
components: new Set([
|
||||
"ContentProcessSingleton.js",
|
||||
]),
|
||||
modules: new Set([
|
||||
"chrome://mochikit/content/ShutdownLeaksCollector.jsm",
|
||||
"resource://specialpowers/specialpowers.js",
|
||||
"resource://specialpowers/specialpowersAPI.js",
|
||||
|
||||
"resource://gre/modules/ContentProcessSingleton.jsm",
|
||||
|
||||
// General utilities
|
||||
"resource://gre/modules/AppConstants.jsm",
|
||||
"resource://gre/modules/AsyncShutdown.jsm",
|
||||
|
|
|
@ -231,8 +231,6 @@
|
|||
@RESPATH@/components/utils.manifest
|
||||
@RESPATH@/components/simpleServices.js
|
||||
@RESPATH@/components/ProcessSingleton.manifest
|
||||
@RESPATH@/components/MainProcessSingleton.js
|
||||
@RESPATH@/components/ContentProcessSingleton.js
|
||||
@RESPATH@/components/nsURLFormatter.manifest
|
||||
@RESPATH@/components/nsURLFormatter.js
|
||||
@RESPATH@/components/PageThumbsStorageService.js
|
||||
|
|
|
@ -166,8 +166,6 @@
|
|||
@BINPATH@/components/nsUpdateTimerManager.js
|
||||
|
||||
@BINPATH@/components/ProcessSingleton.manifest
|
||||
@BINPATH@/components/MainProcessSingleton.js
|
||||
@BINPATH@/components/ContentProcessSingleton.js
|
||||
@BINPATH@/components/nsURLFormatter.manifest
|
||||
@BINPATH@/components/nsURLFormatter.js
|
||||
@BINPATH@/components/ContentPrefService2.manifest
|
||||
|
|
|
@ -39,4 +39,4 @@ ContentProcessSingleton.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentProcessSingleton]);
|
||||
var EXPORTED_SYMBOLS = ["ContentProcessSingleton"];
|
|
@ -5,7 +5,6 @@
|
|||
"use strict";
|
||||
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
|
@ -75,4 +74,4 @@ MainProcessSingleton.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MainProcessSingleton]);
|
||||
var EXPORTED_SYMBOLS = ["MainProcessSingleton"];
|
|
@ -1,7 +1,2 @@
|
|||
component {0636a680-45cb-11e4-916c-0800200c9a66} MainProcessSingleton.js process=main
|
||||
contract @mozilla.org/main-process-singleton;1 {0636a680-45cb-11e4-916c-0800200c9a66} process=main
|
||||
category app-startup MainProcessSingleton service,@mozilla.org/main-process-singleton;1 process=main
|
||||
|
||||
component {ca2a8470-45c7-11e4-916c-0800200c9a66} ContentProcessSingleton.js process=content
|
||||
contract @mozilla.org/content-process-singleton;1 {ca2a8470-45c7-11e4-916c-0800200c9a66} process=content
|
||||
category app-startup ContentProcessSingleton service,@mozilla.org/content-process-singleton;1 process=content
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# -*- 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': '{0636a680-45cb-11e4-916c-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/main-process-singleton;1'],
|
||||
'jsm': 'resource://gre/modules/MainProcessSingleton.jsm',
|
||||
'constructor': 'MainProcessSingleton',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{ca2a8470-45c7-11e4-916c-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/content-process-singleton;1'],
|
||||
'jsm': 'resource://gre/modules/ContentProcessSingleton.jsm',
|
||||
'constructor': 'ContentProcessSingleton',
|
||||
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
|
||||
},
|
||||
]
|
|
@ -8,11 +8,15 @@ with Files('**'):
|
|||
BUG_COMPONENT = ('Toolkit', 'General')
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'ContentProcessSingleton.js',
|
||||
'MainProcessSingleton.js',
|
||||
'ProcessSingleton.manifest',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'ContentProcessSingleton.jsm',
|
||||
'CustomElementsListener.jsm',
|
||||
'MainProcessSingleton.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче