Bug 988000 - Lazily load FreeSpaceWatcher.jsm. r=fabrice
--- 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 = {