mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Bug 1821901 - Convert toolkit/components/timermanager to ES modules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D172872
This commit is contained in:
parent
03828b4c67
commit
dfac3c918a
@ -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/. */
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const PREF_APP_UPDATE_LASTUPDATETIME_FMT = "app.update.lastUpdateTime.%ID%";
|
||||
const PREF_APP_UPDATE_TIMERMINIMUMDELAY = "app.update.timerMinimumDelay";
|
||||
@ -41,9 +39,10 @@ function LOG(string, alwaysLog = false) {
|
||||
* (e.g. days, weeks, months).
|
||||
* @constructor
|
||||
*/
|
||||
function TimerManager() {
|
||||
export function TimerManager() {
|
||||
Services.obs.addObserver(this, "profile-before-change");
|
||||
}
|
||||
|
||||
TimerManager.prototype = {
|
||||
/**
|
||||
* nsINamed
|
||||
@ -439,5 +438,3 @@ TimerManager.prototype = {
|
||||
"nsIUpdateTimerManager",
|
||||
]),
|
||||
};
|
||||
|
||||
var EXPORTED_SYMBOLS = ["TimerManager"];
|
@ -8,7 +8,7 @@ Classes = [
|
||||
{
|
||||
'cid': '{B322A5C0-A419-484E-96BA-D7182163899F}',
|
||||
'contract_ids': ['@mozilla.org/updates/timer-manager;1'],
|
||||
'jsm': 'resource://gre/modules/UpdateTimerManager.jsm',
|
||||
'esModule': 'resource://gre/modules/UpdateTimerManager.sys.mjs',
|
||||
'constructor': 'TimerManager',
|
||||
'categories': {'profile-after-change': 'nsUpdateTimerManager'},
|
||||
},
|
||||
|
@ -13,7 +13,7 @@ XPIDL_SOURCES += [
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
"UpdateTimerManager.jsm",
|
||||
"UpdateTimerManager.sys.mjs",
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
|
Loading…
Reference in New Issue
Block a user