summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/moz.configure/toolchain.configure4
-rw-r--r--python/mozbuild/mozbuild/mach_commands.py5
-rw-r--r--toolkit/components/jsdownloads/src/DownloadUIHelper.jsm2
3 files changed, 9 insertions, 2 deletions
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
index e1df749456..5f03cb2b74 100644
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -386,9 +386,11 @@ def check_compiler(compiler, language, target):
@imports(_from='__builtin__', _import='open')
@imports('json')
@imports('subprocess')
+@imports('sys')
def get_vc_paths(topsrcdir):
def vswhere(args):
- return json.loads(subprocess.check_output([os.path.join(topsrcdir, 'build/win32/vswhere.exe'), '-format', 'json'] + args))
+ encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
+ return json.loads(subprocess.check_output([os.path.join(topsrcdir, 'build/win32/vswhere.exe'), '-format', 'json'] + args).decode(encoding, 'replace'))
# Can't pass -requires with -legacy, so query each separately.
# Legacy versions first (VS2015)
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
index 4f58a2a33d..6616b24931 100644
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1245,6 +1245,11 @@ class RunProgram(MachCommandBase):
if debug or debugger or debugparams:
if 'INSIDE_EMACS' in os.environ:
self.log_manager.terminal_handler.setLevel(logging.WARNING)
+ # vswhere tells us the exact path of the "devenv.exe" debug executable, but our build machinery
+ # insists on searching the PATH for it regardless. Just work around it rather than overhauling mozdebug.
+ if sys.platform.startswith('win'):
+ tempvar = subprocess.check_output(['vswhere', '-property', 'installationPath'])
+ os.environ["PATH"] += os.pathsep + tempvar.replace("\\", "\\").strip() + "\\Common7\\IDE"
import mozdebug
if not debugger:
diff --git a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
index 3039525f5f..086e3b641a 100644
--- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
@@ -129,7 +129,7 @@ this.DownloadPrompter.prototype = {
*
* @resolves Boolean indicating whether the launch operation can continue.
*/
- async confirmLaunchExecutable: function (aPath)
+ async confirmLaunchExecutable(aPath)
{
const kPrefConfirmOpenExe = "browser.download.confirmOpenExecutable";