Bug 1495049: Launcher process: Treat headless mode as implicit --wait-for-browser; r=mhowell
authorAaron Klotz <aklotz@mozilla.com>
Fri, 28 Sep 2018 19:33:16 +0000
changeset 438734 3afb52191795c502153cb582a1bcb459697548a9
parent 438733 e2c0039583fcd63d87540c4c8e31a7ef3446c025
child 438735 2d322a75865c81bf97ec7bf58725ba3c0a9c95e6
push id70100
push useraklotz@mozilla.com
push dateFri, 28 Sep 2018 19:35:21 +0000
treeherderautoland@3afb52191795 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1495049
milestone64.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 1495049: Launcher process: Treat headless mode as implicit --wait-for-browser; r=mhowell Differential Revision: https://phabricator.services.mozilla.com/D7204
browser/app/winlauncher/LauncherProcessWin.cpp
--- a/browser/app/winlauncher/LauncherProcessWin.cpp
+++ b/browser/app/winlauncher/LauncherProcessWin.cpp
@@ -94,17 +94,21 @@ ProcessCmdLine(int& aArgc, wchar_t* aArg
   mozilla::LauncherFlags result = mozilla::LauncherFlags::eNone;
 
   if (mozilla::CheckArg(aArgc, aArgv, L"wait-for-browser",
                         static_cast<const wchar_t**>(nullptr),
                         mozilla::CheckArgFlag::RemoveArg) == mozilla::ARG_FOUND ||
       mozilla::CheckArg(aArgc, aArgv, L"marionette",
                         static_cast<const wchar_t**>(nullptr),
                         mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND ||
-      mozilla::EnvHasValue("MOZ_AUTOMATION")) {
+      mozilla::CheckArg(aArgc, aArgv, L"headless",
+                        static_cast<const wchar_t**>(nullptr),
+                        mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND ||
+      mozilla::EnvHasValue("MOZ_AUTOMATION") ||
+      mozilla::EnvHasValue("MOZ_HEADLESS")) {
     result |= mozilla::LauncherFlags::eWaitForBrowser;
   }
 
   if (mozilla::CheckArg(aArgc, aArgv, L"no-deelevate",
                         static_cast<const wchar_t**>(nullptr),
                         mozilla::CheckArgFlag::CheckOSInt |
                         mozilla::CheckArgFlag::RemoveArg) == mozilla::ARG_FOUND) {
     result |= mozilla::LauncherFlags::eNoDeelevate;