зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1529060: Minor mscom::ProcessRuntime cleanup; r=Jamie
* Be sure to set mInitResult = S_OK when we've already done process-wide initialization; * Don't bother checking for Win32 lockdown unless we're not in the parent process Differential Revision: https://phabricator.services.mozilla.com/D20386 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
147caaf718
Коммит
c8b2ad1720
|
@ -55,7 +55,7 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||
// window, which implicitly requires user32 and Win32k, which are blocked.
|
||||
// Instead we start a multi-threaded apartment and conduct our process-wide
|
||||
// COM initialization on that MTA background thread.
|
||||
if (IsWin32kLockedDown()) {
|
||||
if (!mIsParentProcess && IsWin32kLockedDown()) {
|
||||
// It is possible that we're running so early that we might need to start
|
||||
// the thread manager ourselves.
|
||||
nsresult rv = nsThreadManager::get().Init();
|
||||
|
@ -87,6 +87,7 @@ void ProcessRuntime::InitInsideApartment() {
|
|||
ProcessInitLock lock;
|
||||
if (lock.IsInitialized()) {
|
||||
// COM has already been initialized by a previous ProcessRuntime instance
|
||||
mInitResult = S_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче