Backed out changeset 671ba1530436 (bug 1715414) for casuing bustages on ContentProcess.cpp. CLOSED TREE

This commit is contained in:
criss 2021-09-28 07:33:53 +03:00
parent ea48b5e2c8
commit a8345dc602
3 changed files with 9 additions and 8 deletions

View File

@ -1285,6 +1285,10 @@ void ContentChild::InitSharedUASheets(const Maybe<SharedMemoryHandle>& aHandle,
void ContentChild::InitXPCOM(
XPCOMInitData&& aXPCOMInit,
const mozilla::dom::ipc::StructuredCloneData& aInitialData) {
// Do this as early as possible to get the parent process to initialize the
// background thread since we'll likely need database information very soon.
BackgroundChild::Startup();
#ifdef MOZ_WIDGET_GTK
// LookAndFeel::NativeInit takes a long time to run on Linux, here we schedule
// it as soon as possible after BackgroundChild::Startup to give

View File

@ -27,7 +27,6 @@
#endif
#include "nsAppRunner.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/ProcessUtils.h"
using mozilla::ipc::IOThreadChild;
@ -219,10 +218,6 @@ bool ContentProcess::Init(int aArgc, char* aArgv[]) {
SetUpSandboxEnvironment();
#endif
// Do this as early as possible to get the parent process to initialize the
// background thread since we'll likely need database information very soon.
ipc::BackgroundChild::Startup();
return true;
}

View File

@ -16,13 +16,14 @@ namespace mozilla {
namespace dom {
class BlobImpl;
class ContentChild;
class ContentParent;
class ContentProcess;
} // namespace dom
namespace net {
class SocketProcessImpl;
class SocketProcessChild;
} // namespace net
@ -54,8 +55,9 @@ class PBackgroundChild;
// The PBackgroundChild actor and all its sub-protocol actors will be
// automatically destroyed when its designated thread completes.
class BackgroundChild final {
friend class mozilla::dom::ContentChild;
friend class mozilla::dom::ContentParent;
friend class mozilla::dom::ContentProcess;
friend class mozilla::net::SocketProcessImpl;
friend class mozilla::net::SocketProcessChild;
typedef mozilla::ipc::Transport Transport;
@ -80,7 +82,7 @@ class BackgroundChild final {
nsIEventTarget* aMainEventTarget = nullptr);
private:
// Only called by this class's friends.
// Only called by ContentChild or ContentParent.
static void Startup();
};