mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 986499 - Make the calls to import Deprecated.jsm lazy. r=yoric
This commit is contained in:
parent
0c67224bf9
commit
18ecb43dde
@ -1239,7 +1239,7 @@ ContentPrefService.prototype = {
|
||||
};
|
||||
|
||||
function warnDeprecated() {
|
||||
Cu.import("resource://gre/modules/Deprecated.jsm");
|
||||
let Deprecated = Cu.import("resource://gre/modules/Deprecated.jsm", {}).Deprecated;
|
||||
Deprecated.warning("nsIContentPrefService is deprecated. Please use nsIContentPrefService2 instead.",
|
||||
"https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIContentPrefService2",
|
||||
Components.stack.caller);
|
||||
|
@ -26,9 +26,12 @@ const Ci = Components.interfaces;
|
||||
|
||||
let SharedAll = {};
|
||||
Cu.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", SharedAll);
|
||||
Cu.import("resource://gre/modules/Deprecated.jsm", this);
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||
Cu.import("resource://gre/modules/Timer.jsm", this);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, 'Deprecated',
|
||||
'resource://gre/modules/Deprecated.jsm');
|
||||
|
||||
// Boilerplate, to simplify the transition to require()
|
||||
let LOG = SharedAll.LOG.bind(SharedAll, "Controller");
|
||||
let isTypedArray = SharedAll.isTypedArray;
|
||||
|
@ -16,9 +16,10 @@ Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Cu.import("resource://gre/modules/BookmarkJSONUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
Cu.import("resource://gre/modules/osfile.jsm");
|
||||
Cu.import("resource://gre/modules/Deprecated.jsm");
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
|
||||
"resource://gre/modules/Deprecated.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "OS",
|
||||
"resource://gre/modules/osfile.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Sqlite",
|
||||
|
@ -13,11 +13,14 @@ const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm", this);
|
||||
Cu.import("resource://gre/modules/Deprecated.jsm", this);
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||
Cu.import("resource://gre/modules/osfile.jsm", this);
|
||||
Cu.import("resource://gre/modules/Task.jsm", this);
|
||||
Cu.import("resource://gre/modules/Promise.jsm", this);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, 'Deprecated',
|
||||
'resource://gre/modules/Deprecated.jsm');
|
||||
|
||||
const Telemetry = Services.telemetry;
|
||||
|
||||
// Files that have been lying around for longer than MAX_PING_FILE_AGE are
|
||||
|
@ -104,7 +104,7 @@ DownloadLastDir.prototype = {
|
||||
// This function is now deprecated as it uses the sync nsIContentPrefService
|
||||
// interface. New consumers should use the getFileAsync function.
|
||||
getFile: function (aURI) {
|
||||
Components.utils.import("resource://gre/modules/Deprecated.jsm");
|
||||
let Deprecated = Components.utils.import("resource://gre/modules/Deprecated.jsm", {}).Deprecated;
|
||||
Deprecated.warning("DownloadLastDir.getFile is deprecated. Please use getFileAsync instead.",
|
||||
"https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/DownloadLastDir.jsm",
|
||||
Components.stack.caller);
|
||||
|
Loading…
Reference in New Issue
Block a user