mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1566592 - Use a dedicated thread for launching on android. r=jld
At the moment, this shouldn't make any difference because we only ever launch one child process on android. Differential Revision: https://phabricator.services.mozilla.com/D38244 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
7bd2ec1585
commit
5b2d1df481
@ -773,9 +773,11 @@ void BaseProcessLauncher::GetChildLogName(const char* origLogName,
|
||||
|
||||
// Windows needs a single dedicated thread for process launching,
|
||||
// because of thread-safety restrictions/assertions in the sandbox
|
||||
// code. (This implementation isn't itself Windows-specific, so
|
||||
// the ifdef can be changed to test on other platforms.)
|
||||
#ifdef XP_WIN
|
||||
// code.
|
||||
//
|
||||
// Android also needs a single dedicated thread to simplify thread
|
||||
// safety in java.
|
||||
#if defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
static mozilla::StaticMutex gIPCLaunchThreadMutex;
|
||||
static mozilla::StaticRefPtr<nsIThread> gIPCLaunchThread;
|
||||
@ -828,9 +830,9 @@ nsCOMPtr<nsIEventTarget> BaseProcessLauncher::GetIPCLauncher() {
|
||||
return thread;
|
||||
}
|
||||
|
||||
#else // XP_WIN
|
||||
#else // defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
// Non-Windows platforms can use an on-demand thread pool.
|
||||
// Other platforms use an on-demand thread pool.
|
||||
|
||||
nsCOMPtr<nsIEventTarget> BaseProcessLauncher::GetIPCLauncher() {
|
||||
nsCOMPtr<nsIEventTarget> pool =
|
||||
|
Loading…
Reference in New Issue
Block a user