Bug 1524688: Part 42 - Convert nsAsyncShutdown to static registration. r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D18452

--HG--
rename : toolkit/components/asyncshutdown/nsAsyncShutdown.js => toolkit/components/asyncshutdown/nsAsyncShutdown.jsm
extra : rebase_source : 368ed0b816c28cc9452ee2cefbd4a2c5fb862974
This commit is contained in:
Kris Maglione 2019-01-30 11:00:27 -08:00
parent 9a509d652d
commit bcd433d7e3
7 changed files with 19 additions and 27 deletions

View File

@ -99,10 +99,8 @@ const whitelist = {
// required, as opposed to items in the main whitelist,
// which are all required.
const intermittently_loaded_whitelist = {
components: new Set([
"nsAsyncShutdown.js",
]),
modules: new Set([
"resource://gre/modules/nsAsyncShutdown.jsm",
"resource://gre/modules/sessionstore/Utils.jsm",
]),
frameScripts: new Set([]),

View File

@ -246,9 +246,6 @@
@RESPATH@/defaults/pref/marionette.js
#endif
@RESPATH@/components/nsAsyncShutdown.manifest
@RESPATH@/components/nsAsyncShutdown.js
@RESPATH@/components/BuiltinProviders.manifest
@RESPATH@/components/PresentationControlService.js

View File

@ -158,9 +158,6 @@
@BINPATH@/components/TestInterfaceJSMaplike.js
#endif
@BINPATH@/components/nsAsyncShutdown.manifest
@BINPATH@/components/nsAsyncShutdown.js
#ifndef MOZ_GECKOVIEW_JAR
@BINPATH@/components/BuiltinProviders.manifest
@BINPATH@/components/PresentationControlService.js

View File

@ -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': '{35c496de-a115-475d-93b5-ffa3f3ae6fe3}',
'contract_ids': ['@mozilla.org/async-shutdown-service;1'],
'jsm': 'resource://gre/modules/nsAsyncShutdown.jsm',
'constructor': 'nsAsyncShutdownService',
},
]

View File

@ -14,11 +14,11 @@ XPIDL_SOURCES += [
EXTRA_JS_MODULES += [
'AsyncShutdown.jsm',
'nsAsyncShutdown.jsm',
]
EXTRA_COMPONENTS += [
'nsAsyncShutdown.js',
'nsAsyncShutdown.manifest',
XPCOM_MANIFESTS += [
'components.conf',
]
with Files('**'):

View File

@ -8,7 +8,6 @@
"use strict";
var XPCOMUtils = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", {}).XPCOMUtils;
ChromeUtils.defineModuleGetter(this, "AsyncShutdown",
"resource://gre/modules/AsyncShutdown.jsm");
@ -174,9 +173,7 @@ nsAsyncShutdownClient.prototype = {
return this._moduleClient.removeBlocker(moduleBlocker);
},
/* ........ QueryInterface .............. */
QueryInterface: ChromeUtils.generateQI([Ci.nsIAsyncShutdownBarrier]),
classID: Components.ID("{314e9e96-cc37-4d5c-843b-54709ce11426}"),
};
/**
@ -206,9 +203,7 @@ nsAsyncShutdownBarrier.prototype = {
// By specification, _moduleBarrier.wait() cannot reject.
},
/* ........ QueryInterface .............. */
QueryInterface: ChromeUtils.generateQI([Ci.nsIAsyncShutdownBarrier]),
classID: Components.ID("{29a0e8b5-9111-4c09-a0eb-76cd02bf20fa}"),
};
function nsAsyncShutdownService() {
@ -253,14 +248,7 @@ nsAsyncShutdownService.prototype = {
return new nsAsyncShutdownBarrier(new AsyncShutdown.Barrier(name));
},
/* ........ QueryInterface .............. */
QueryInterface: ChromeUtils.generateQI([Ci.nsIAsyncShutdownService]),
classID: Components.ID("{35c496de-a115-475d-93b5-ffa3f3ae6fe3}"),
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
nsAsyncShutdownService,
nsAsyncShutdownBarrier,
nsAsyncShutdownClient,
]);
var EXPORTED_SYMBOLS = ["nsAsyncShutdownService"];

View File

@ -1,2 +0,0 @@
component {35c496de-a115-475d-93b5-ffa3f3ae6fe3} nsAsyncShutdown.js
contract @mozilla.org/async-shutdown-service;1 {35c496de-a115-475d-93b5-ffa3f3ae6fe3}