diff --git a/mobile/android/components/ColorPicker.js b/mobile/android/components/ColorPicker.js index 94206bf7632..5eb7ac52987 100644 --- a/mobile/android/components/ColorPicker.js +++ b/mobile/android/components/ColorPicker.js @@ -8,7 +8,9 @@ const Cc = Components.classes; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Prompt.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "Prompt", + "resource://gre/modules/Prompt.jsm"); function ColorPicker() { } diff --git a/mobile/android/components/HelperAppDialog.js b/mobile/android/components/HelperAppDialog.js index 9b2a1eb4b97..811dc2c1e4c 100644 --- a/mobile/android/components/HelperAppDialog.js +++ b/mobile/android/components/HelperAppDialog.js @@ -11,7 +11,6 @@ const URI_GENERIC_ICON_DOWNLOAD = "drawable://alert_download"; Cu.import("resource://gre/modules/FileUtils.jsm"); Cu.import("resource://gre/modules/HelperApps.jsm"); -Cu.import("resource://gre/modules/Prompt.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/components/NSSDialogService.js b/mobile/android/components/NSSDialogService.js index 2ed1c30931d..203f7cb9281 100644 --- a/mobile/android/components/NSSDialogService.js +++ b/mobile/android/components/NSSDialogService.js @@ -8,7 +8,9 @@ const Cc = Components.classes; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Prompt.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "Prompt", + "resource://gre/modules/Prompt.jsm"); // ----------------------------------------------------------------------- // NSS Dialog Service diff --git a/mobile/android/components/PromptService.js b/mobile/android/components/PromptService.js index 6efdce5b4fb..8d96bfa0c98 100644 --- a/mobile/android/components/PromptService.js +++ b/mobile/android/components/PromptService.js @@ -8,7 +8,9 @@ const Cu = Components.utils; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Prompt.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "Prompt", + "resource://gre/modules/Prompt.jsm"); var gPromptService = null; diff --git a/mobile/android/components/TabSource.js b/mobile/android/components/TabSource.js index 5adbd27ac42..960fb33781c 100644 --- a/mobile/android/components/TabSource.js +++ b/mobile/android/components/TabSource.js @@ -8,7 +8,9 @@ const { classes: Cc, interfaces: Ci, manager: Cm, utils: Cu, results: Cr } = Com Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Prompt.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "Prompt", + "resource://gre/modules/Prompt.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "sendMessageToJava", "resource://gre/modules/Messaging.jsm"); diff --git a/mobile/android/modules/HelperApps.jsm b/mobile/android/modules/HelperApps.jsm index 606f8486805..3c46e26e48c 100644 --- a/mobile/android/modules/HelperApps.jsm +++ b/mobile/android/modules/HelperApps.jsm @@ -7,8 +7,12 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Prompt.jsm"); -Cu.import("resource://gre/modules/Messaging.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "Prompt", + "resource://gre/modules/Prompt.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "sendMessageToJava", + "resource://gre/modules/Messaging.jsm"); XPCOMUtils.defineLazyGetter(this, "ContentAreaUtils", function() { let ContentAreaUtils = {};