Bug 1783633 - Launch the crash reporter client outside of Firefox' job r=bobowen

Differential Revision: https://phabricator.services.mozilla.com/D153936
This commit is contained in:
Gabriele Svelto 2022-08-08 12:19:57 +00:00
Родитель 30c708f0cd
Коммит 52be70485d
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -1204,10 +1204,14 @@ static bool LaunchProgram(const XP_CHAR* aProgramPath,
STARTUPINFO si = {};
si.cb = sizeof(si);
// If CreateProcess() fails don't do anything
if (CreateProcess(nullptr, (LPWSTR)cmdLine, nullptr, nullptr, FALSE,
NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, nullptr, nullptr,
&si, &pi)) {
// If CreateProcess() fails don't do anything.
if (CreateProcess(
/* lpApplicationName */ nullptr, (LPWSTR)cmdLine,
/* lpProcessAttributes */ nullptr, /* lpThreadAttributes */ nullptr,
/* bInheritHandles */ FALSE,
NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW | CREATE_BREAKAWAY_FROM_JOB,
/* lpEnvironment */ nullptr, /* lpCurrentDirectory */ nullptr, &si,
&pi)) {
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}