Bug 1458386: Modify mach's RunProgram command provider to be aware of launcher process; r=gps
authorAaron Klotz <aklotz@mozilla.com>
Tue, 14 Aug 2018 12:09:32 -0600
changeset 487728 c7bea57cb29c6fb6175151c5277cdef30dcd67a9
parent 487727 93e52a1e5d88d169fca83b1f8e9f0eb78d809cc9
child 487729 1860f2aa532d6312145e198f095018dcf3bebae2
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1458386
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1458386: Modify mach's RunProgram command provider to be aware of launcher process; r=gps By default, when the launcher process is enabled, it does not wait for the browser process to complete before terminating. mach run expects its child process to keep running until the browser is terminated. If we pass -wait-for-browser to the launcher process, the launcher will not terminate until the browser process has finished, thus preserving the existing semantics.
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -900,16 +900,20 @@ class RunProgram(MachCommandBase):
                 args.extend(params)
 
             if not remote:
                 args.append('-no-remote')
 
             if not background and sys.platform == 'darwin':
                 args.append('-foreground')
 
+            if sys.platform.startswith('win') and \
+               'MOZ_LAUNCHER_PROCESS' in self.defines:
+                args.append('-wait-for-browser')
+
             no_profile_option_given = \
                 all(p not in params for p in ['-profile', '--profile', '-P'])
             if no_profile_option_given and not noprofile:
                 prefs = {
                    'browser.shell.checkDefaultBrowser': False,
                    'general.warnOnAboutConfig': False,
                 }
                 prefs.update(self._mach_context.settings.runprefs)