From 180543f6c37887cdb19c07cf47491b52154f1157 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Thu, 6 Feb 2020 08:31:14 -0500 Subject: Issue #65 - Remove AppConstants from toolkit/components/jsdownloads --- toolkit/components/jsdownloads/src/DownloadIntegration.jsm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'toolkit/components/jsdownloads/src/DownloadIntegration.jsm') diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm index a6875ec48..995cc0669 100644 --- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm +++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm @@ -28,8 +28,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown", "resource://gre/modules/AsyncShutdown.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask", "resource://gre/modules/DeferredTask.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Downloads", @@ -696,8 +695,11 @@ this.DownloadIntegration = { fileExtension = match[1]; } - let isWindowsExe = AppConstants.platform == "win" && - fileExtension.toLowerCase() == "exe"; +#ifdef XP_WIN + let isWindowsExe = fileExtension.toLowerCase() == "exe"; +#else + let isWindowsExe = false; +#endif // Ask for confirmation if the file is executable, except for .exe on // Windows where the operating system will show the prompt based on the -- cgit v1.2.3