summaryrefslogtreecommitdiff
path: root/chromium/content/child/child_thread_impl.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/content/child/child_thread_impl.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/child/child_thread_impl.cc')
-rw-r--r--chromium/content/child/child_thread_impl.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/chromium/content/child/child_thread_impl.cc b/chromium/content/child/child_thread_impl.cc
index 9d3b69def68..78e5cd7958d 100644
--- a/chromium/content/child/child_thread_impl.cc
+++ b/chromium/content/child/child_thread_impl.cc
@@ -5,6 +5,8 @@
#include "content/child/child_thread_impl.h"
#include <signal.h>
+
+#include <memory>
#include <string>
#include <utility>
@@ -47,6 +49,7 @@
#include "content/common/child_process.mojom.h"
#include "content/common/field_trial_recorder.mojom.h"
#include "content/common/in_process_child_thread_params.h"
+#include "content/common/mojo_core_library_support.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
@@ -570,16 +573,19 @@ void ChildThreadImpl::Init(const Options& options) {
// IPC mode.
mojo::ScopedMessagePipeHandle child_process_pipe;
if (!IsInBrowserProcess()) {
- scoped_refptr<base::SingleThreadTaskRunner> mojo_ipc_task_runner =
- GetIOTaskRunner();
- if (base::FeatureList::IsEnabled(features::kMojoDedicatedThread)) {
- mojo_ipc_thread_.StartWithOptions(
- base::Thread::Options(base::MessagePumpType::IO, 0));
- mojo_ipc_task_runner = mojo_ipc_thread_.task_runner();
+ // If using a shared Mojo Core library, IPC support is already initialized.
+ if (!IsMojoCoreSharedLibraryEnabled()) {
+ scoped_refptr<base::SingleThreadTaskRunner> mojo_ipc_task_runner =
+ GetIOTaskRunner();
+ if (base::FeatureList::IsEnabled(features::kMojoDedicatedThread)) {
+ mojo_ipc_thread_.StartWithOptions(
+ base::Thread::Options(base::MessagePumpType::IO, 0));
+ mojo_ipc_task_runner = mojo_ipc_thread_.task_runner();
+ }
+ mojo_ipc_support_ = std::make_unique<mojo::core::ScopedIPCSupport>(
+ mojo_ipc_task_runner,
+ mojo::core::ScopedIPCSupport::ShutdownPolicy::FAST);
}
- mojo_ipc_support_.reset(new mojo::core::ScopedIPCSupport(
- mojo_ipc_task_runner,
- mojo::core::ScopedIPCSupport::ShutdownPolicy::FAST));
mojo::IncomingInvitation invitation = InitializeMojoIPCChannel();
child_process_pipe = invitation.ExtractMessagePipe(0);
} else {