Bug 955672 - Use defineLazyModuleGetter instead of defineLazyGetter, r=florian.
authorPatrick Cloke <clokep@gmail.com>
Fri, 18 Oct 2013 07:36:41 -0400
changeset 17310 a2e3a113185da50bb18c44d533a46e179a31ca49
parent 17309 0396145c4329b82381f90b9acab90d103f0583a6
child 17311 fe1660b5139132dc358fc8184ab2522b2cd6070c
push id1151
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:50:32 +0000
treeherdercomm-aurora@267d8e9143d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs955672
Bug 955672 - Use defineLazyModuleGetter instead of defineLazyGetter, r=florian.
chat/protocols/irc/ircBase.jsm
chat/protocols/xmpp/xmpp.jsm
--- a/chat/protocols/irc/ircBase.jsm
+++ b/chat/protocols/irc/ircBase.jsm
@@ -22,20 +22,18 @@ const EXPORTED_SYMBOLS = ["ircBase"];
 const {interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/imServices.jsm");
 Cu.import("resource:///modules/ircHandlers.jsm");
 Cu.import("resource:///modules/ircUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "DownloadUtils", function() {
-  Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
-  return DownloadUtils;
-});
+XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils",
+  "resource://gre/modules/DownloadUtils.jsm");
 
 function ircRoomInfo(aName, aTopic, aParticipantCount, aAccount) {
   this.name = aName;
   this.topic = aTopic;
   this.participantCount = aParticipantCount;
   this._account = aAccount;
 }
 ircRoomInfo.prototype = {
--- a/chat/protocols/xmpp/xmpp.jsm
+++ b/chat/protocols/xmpp/xmpp.jsm
@@ -14,28 +14,22 @@ const {classes: Cc, interfaces: Ci, resu
 Cu.import("resource:///modules/imServices.jsm");
 Cu.import("resource:///modules/imStatusUtils.jsm");
 Cu.import("resource:///modules/imXPCOMUtils.jsm");
 Cu.import("resource:///modules/jsProtoHelper.jsm");
 Cu.import("resource:///modules/socket.jsm");
 Cu.import("resource:///modules/xmpp-xml.jsm");
 Cu.import("resource:///modules/xmpp-session.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "DownloadUtils", function() {
-  Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
-  return DownloadUtils;
-});
-XPCOMUtils.defineLazyGetter(this, "FileUtils", function() {
-  Components.utils.import("resource://gre/modules/FileUtils.jsm");
-  return FileUtils;
-});
-XPCOMUtils.defineLazyGetter(this, "NetUtil", function() {
-  Components.utils.import("resource://gre/modules/NetUtil.jsm");
-  return NetUtil;
-});
+XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils",
+  "resource://gre/modules/DownloadUtils.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
+  "resource://gre/modules/FileUtils.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
+  "resource://gre/modules/NetUtil.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "imgTools",
                                    "@mozilla.org/image/tools;1",
                                    "imgITools");
 
 XPCOMUtils.defineLazyGetter(this, "_", function()
   l10nHelper("chrome://chat/locale/xmpp.properties")
 );