mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1667294 - Skip parts of SandboxBroker::LaunchApp when launching a Thunderbird process. r=tkikuchi
Thunderbird does not yet have the same blocklist initialization as Firefox, so we skip calling InitDllBlocklistOOP to avoid a MOZ_RELEASE_ASSERT. Differential Revision: https://phabricator.services.mozilla.com/D99173
This commit is contained in:
parent
8b497747e3
commit
610cbaea58
@ -38,6 +38,13 @@ void ModuleLoadFrame::StaticInit(
|
||||
// the launcher process blocklist.
|
||||
gFallbackLoaderAPI.SetObserver(aNewObserver);
|
||||
sLoaderAPI = &gFallbackLoaderAPI;
|
||||
|
||||
if (aOutWinLauncherFunctions) {
|
||||
aOutWinLauncherFunctions->mHandleLauncherError =
|
||||
[](const mozilla::LauncherError&, const char*) {};
|
||||
// We intentionally leave mInitDllBlocklistOOP null to make sure calling
|
||||
// mInitDllBlocklistOOP in non-Firefox hits MOZ_RELEASE_ASSERT.
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,16 @@ bool SandboxBroker::LaunchApp(const wchar_t* aPath, const wchar_t* aArguments,
|
||||
last_error, last_warning);
|
||||
}
|
||||
|
||||
if (XRE_GetChildProcBinPathType(aProcessType) == BinPathType::Self) {
|
||||
#ifdef MOZ_THUNDERBIRD
|
||||
// In Thunderbird, mInitDllBlocklistOOP is null, so InitDllBlocklistOOP would
|
||||
// hit MOZ_RELEASE_ASSERT.
|
||||
constexpr bool isThunderbird = true;
|
||||
#else
|
||||
constexpr bool isThunderbird = false;
|
||||
#endif
|
||||
|
||||
if (!isThunderbird &&
|
||||
XRE_GetChildProcBinPathType(aProcessType) == BinPathType::Self) {
|
||||
RefPtr<DllServices> dllSvc(DllServices::Get());
|
||||
LauncherVoidResultWithLineInfo blocklistInitOk =
|
||||
dllSvc->InitDllBlocklistOOP(aPath, targetInfo.hProcess,
|
||||
|
Loading…
Reference in New Issue
Block a user