Commit a89461fe authored by morrita's avatar morrita Committed by Commit bot

IPC Fuzzer: Initialize mojo in the replay process.

Without this, ChannelMojo doesn't work.

R=inferno@chromium.org, tsepez@chromium.org
TBR=jamesr@chromium.org
BUG=453571

Review URL: https://codereview.chromium.org/867903006

Cr-Commit-Position: refs/heads/master@{#314010}
parent 0ed09181
include_rules = [ include_rules = [
"+chrome/common", "+chrome/common",
"+content/public/common", "+content/public/common",
"+third_party/mojo/src/mojo/edk/embedder"
] ]
...@@ -16,9 +16,21 @@ ...@@ -16,9 +16,21 @@
#include "ipc/ipc_descriptors.h" #include "ipc/ipc_descriptors.h"
#include "ipc/ipc_switches.h" #include "ipc/ipc_switches.h"
#include "ipc/mojo/ipc_channel_mojo.h" #include "ipc/mojo/ipc_channel_mojo.h"
#include "third_party/mojo/src/mojo/edk/embedder/configuration.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
namespace ipc_fuzzer { namespace ipc_fuzzer {
// TODO(morrita): content::InitializeMojo() should be used once it becomes
// a public API. See src/content/app/mojo/mojo_init.cc
void InitializeMojo() {
mojo::embedder::GetConfiguration()->max_message_num_bytes =
64 * 1024 * 1024;
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
ReplayProcess::ReplayProcess() ReplayProcess::ReplayProcess()
: io_thread_("Chrome_ChildIOThread"), : io_thread_("Chrome_ChildIOThread"),
shutdown_event_(true, false), shutdown_event_(true, false),
...@@ -60,6 +72,8 @@ bool ReplayProcess::Initialize(int argc, const char** argv) { ...@@ -60,6 +72,8 @@ bool ReplayProcess::Initialize(int argc, const char** argv) {
kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor);
#endif #endif
InitializeMojo();
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment