mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #65 - Remove AppConstants from toolkit/modules
Except for secondscreen
This commit is contained in:
parent
cf41a9dd87
commit
cc403750d3
10 changed files with 174 additions and 168 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
}]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue