mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1050122 - Part 2: Disable preallocate when proc loader is not initialized. r=khuey
This commit is contained in:
parent
4f77c2c332
commit
3055606b7d
@ -18,6 +18,10 @@
|
||||
#include "ipc/Nuwa.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_B2G_LOADER
|
||||
#include "ProcessUtils.h"
|
||||
#endif
|
||||
|
||||
// This number is fairly arbitrary ... the intention is to put off
|
||||
// launching another app process until the last one has finished
|
||||
// loading its content, to reduce CPU/memory/IO contention.
|
||||
@ -133,7 +137,14 @@ PreallocatedProcessManagerImpl::Init()
|
||||
os->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID,
|
||||
/* weakRef = */ false);
|
||||
}
|
||||
RereadPrefs();
|
||||
#ifdef MOZ_B2G_LOADER
|
||||
if (!mozilla::ipc::ProcLoaderIsInitialized()) {
|
||||
Disable();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
RereadPrefs();
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -21,7 +21,7 @@ void SetThisProcessName(const char *aName);
|
||||
#ifdef MOZ_B2G_LOADER
|
||||
// see ProcessUtils_linux.cpp for explaination.
|
||||
void ProcLoaderClientGeckoInit();
|
||||
|
||||
bool ProcLoaderIsInitialized();
|
||||
bool ProcLoaderLoad(const char *aArgv[],
|
||||
const char *aEnvp[],
|
||||
const base::file_handle_mapping_vector &aFdsRemap,
|
||||
|
@ -227,6 +227,11 @@ ProcLoaderClientGeckoInit()
|
||||
sProcLoaderLoop = MessageLoop::current();
|
||||
}
|
||||
|
||||
bool ProcLoaderIsInitialized()
|
||||
{
|
||||
return sProcLoaderPid != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdown and destroy the client of B2G loader service.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user