зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1743489 - Content process makes early return from `LauncherMain` before any registry access. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D132407
This commit is contained in:
Родитель
caaffc3a03
Коммит
f5551c4395
|
@ -199,15 +199,6 @@ static mozilla::Maybe<bool> RunAsLauncherProcess(
|
|||
#else
|
||||
static mozilla::Maybe<bool> RunAsLauncherProcess(int& argc, wchar_t** argv) {
|
||||
#endif // defined(MOZ_LAUNCHER_PROCESS)
|
||||
// return fast when we're a child process.
|
||||
// (The remainder of this function has some side effects that are
|
||||
// undesirable for content processes)
|
||||
if (mozilla::CheckArg(argc, argv, L"contentproc",
|
||||
static_cast<const wchar_t**>(nullptr),
|
||||
mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND) {
|
||||
return mozilla::Some(false);
|
||||
}
|
||||
|
||||
bool runAsLauncher = DoLauncherProcessChecks(argc, argv);
|
||||
|
||||
#if defined(MOZ_LAUNCHER_PROCESS)
|
||||
|
@ -262,6 +253,16 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
|
|||
SetLauncherErrorForceEventLog();
|
||||
}
|
||||
|
||||
// return fast when we're a child process.
|
||||
// (The remainder of this function has some side effects that are
|
||||
// undesirable for content processes)
|
||||
if (mozilla::CheckArg(argc, argv, L"contentproc",
|
||||
static_cast<const wchar_t**>(nullptr),
|
||||
mozilla::CheckArgFlag::None) == mozilla::ARG_FOUND) {
|
||||
// A child process should not instantiate LauncherRegistryInfo.
|
||||
return Nothing();
|
||||
}
|
||||
|
||||
#if defined(MOZ_LAUNCHER_PROCESS)
|
||||
LauncherRegistryInfo regInfo;
|
||||
Maybe<bool> runAsLauncher = RunAsLauncherProcess(regInfo, argc, argv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче