summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/subprocess
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-02 04:25:47 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:26:25 +0200
commit73289f53892c4c48eedf8de5a40af74ff9b55a09 (patch)
treec3991d265b47fad7c75cf45812ac1963103ccf7b /toolkit/modules/subprocess
parent4acc0d58cb0fa989d609972493be363c105f2594 (diff)
downloadUXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.gz
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.lz
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.xz
UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.zip
Issue #65 - Remove AppConstants from toolkit/modules
Except for secondscreen
Diffstat (limited to 'toolkit/modules/subprocess')
-rw-r--r--toolkit/modules/subprocess/Subprocess.jsm15
-rw-r--r--toolkit/modules/subprocess/moz.build2
-rw-r--r--toolkit/modules/subprocess/subprocess_win.jsm3
3 files changed, 9 insertions, 11 deletions
diff --git a/toolkit/modules/subprocess/Subprocess.jsm b/toolkit/modules/subprocess/Subprocess.jsm
index 6d0d27d77..e4e4156df 100644
--- a/toolkit/modules/subprocess/Subprocess.jsm
+++ b/toolkit/modules/subprocess/Subprocess.jsm
@@ -18,17 +18,16 @@ let EXPORTED_SYMBOLS = ["Subprocess"];
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/subprocess/subprocess_common.jsm");
-if (AppConstants.platform == "win") {
- XPCOMUtils.defineLazyModuleGetter(this, "SubprocessImpl",
- "resource://gre/modules/subprocess/subprocess_win.jsm");
-} else {
- XPCOMUtils.defineLazyModuleGetter(this, "SubprocessImpl",
- "resource://gre/modules/subprocess/subprocess_unix.jsm");
-}
+#ifdef XP_WIN
+XPCOMUtils.defineLazyModuleGetter(this, "SubprocessImpl",
+ "resource://gre/modules/subprocess/subprocess_win.jsm");
+#else
+XPCOMUtils.defineLazyModuleGetter(this, "SubprocessImpl",
+ "resource://gre/modules/subprocess/subprocess_unix.jsm");
+#endif
/**
* Allows for creation of and communication with OS-level sub-processes.
diff --git a/toolkit/modules/subprocess/moz.build b/toolkit/modules/subprocess/moz.build
index e7a1f526a..c4548c8f6 100644
--- a/toolkit/modules/subprocess/moz.build
+++ b/toolkit/modules/subprocess/moz.build
@@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-EXTRA_JS_MODULES += [
+EXTRA_PP_JS_MODULES += [
'Subprocess.jsm',
]
diff --git a/toolkit/modules/subprocess/subprocess_win.jsm b/toolkit/modules/subprocess/subprocess_win.jsm
index aac625f72..aceedd3e8 100644
--- a/toolkit/modules/subprocess/subprocess_win.jsm
+++ b/toolkit/modules/subprocess/subprocess_win.jsm
@@ -15,7 +15,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var EXPORTED_SYMBOLS = ["SubprocessImpl"];
-Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/ctypes.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
Cu.import("resource://gre/modules/Services.jsm");
@@ -35,7 +34,7 @@ class WinPromiseWorker extends PromiseWorker {
this.signalEvent = libc.CreateSemaphoreW(null, 0, 32, null);
this.call("init", [{
- breakAwayFromJob: !AppConstants.isPlatformAndVersionAtLeast("win", "6.2"),
+ breakAwayFromJob: Services.vc.compare(Services.sysinfo.getProperty("version"), "6.2") <= 0,
comspec: env.get("COMSPEC"),
signalEvent: String(ctypes.cast(this.signalEvent, ctypes.uintptr_t).value),
}]);