Browse Source

Bug 996448 - Lazify the loading of PluralForm.jsm everywhere

pull/1/head
janekptacijarabaci 4 years ago committed by Roy Tam
parent
commit
e05cd41451
  1. 10
      application/palemoon/base/content/browser.js
  2. 5
      application/palemoon/components/preferences/aboutPermissions.js
  3. 4
      application/palemoon/modules/webrtcUI.jsm

10
application/palemoon/base/content/browser.js

@ -83,14 +83,8 @@ this.__defineSetter__("AddonManager", function (val) {
return this.AddonManager = val;
});
this.__defineGetter__("PluralForm", function() {
Cu.import("resource://gre/modules/PluralForm.jsm");
return this.PluralForm;
});
this.__defineSetter__("PluralForm", function (val) {
delete this.PluralForm;
return this.PluralForm = val;
});
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
"resource:///modules/AboutHomeUtils.jsm");

5
application/palemoon/components/preferences/aboutPermissions.js

@ -6,13 +6,16 @@ var Ci = Components.interfaces;
var Cc = Components.classes;
var Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PluralForm.jsm");
Cu.import("resource://gre/modules/DownloadUtils.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/ForgetAboutSite.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
var gFaviconService = Cc["@mozilla.org/browser/favicon-service;1"].
getService(Ci.nsIFaviconService);

4
application/palemoon/modules/webrtcUI.jsm

@ -11,9 +11,11 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PluralForm.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "MediaManagerService",
"@mozilla.org/mediaManagerService;1",
"nsIMediaManagerService");

Loading…
Cancel
Save