Bug 988000 - Lazily load FreeSpaceWatcher.jsm. r=fabrice
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 25 Mar 2014 19:54:48 -0700
changeset 175414 213ffe89634184343289bb7b65d3be63710a6b92
parent 175413 26719e92872b64267029ca752b11f072bcd5a5aa
child 175415 50ada08f07eed0f237dcfce799350bc9868bd72b
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersfabrice
bugs988000
milestone31.0a1
Bug 988000 - Lazily load FreeSpaceWatcher.jsm. r=fabrice
dom/apps/src/AppDownloadManager.jsm
--- a/dom/apps/src/AppDownloadManager.jsm
+++ b/dom/apps/src/AppDownloadManager.jsm
@@ -3,17 +3,20 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/FreeSpaceWatcher.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+XPCOMUtils.defineLazyModuleGetter(this, "FreeSpaceWatcher",
+                                  "resource://gre/modules/FreeSpaceWatcher.jsm");
 
 this.EXPORTED_SYMBOLS = ["AppDownloadManager"];
 
 function debug(aMsg) {
   //dump("-*-*- AppDownloadManager.jsm : " + aMsg + "\n");
 }
 
 this.AppDownloadManager = {