summaryrefslogtreecommitdiffstats
path: root/ipc/mojo/ipc_mojo_perftest.cc
diff options
context:
space:
mode:
authormorrita <morrita@chromium.org>2014-09-25 20:20:48 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-26 03:20:58 +0000
commite9453ea69cbb3d52e67394e75c747b0b2d970621 (patch)
tree3178358ae6c053774fbf636668f1e34f11526f60 /ipc/mojo/ipc_mojo_perftest.cc
parentba4cf8bb6dc77ea033fe13989eb604d6069daa97 (diff)
downloadchromium_src-e9453ea69cbb3d52e67394e75c747b0b2d970621.zip
chromium_src-e9453ea69cbb3d52e67394e75c747b0b2d970621.tar.gz
chromium_src-e9453ea69cbb3d52e67394e75c747b0b2d970621.tar.bz2
ChannelMojo: Handle when ChannelMojo outlives ChannelMojoHost
In some case ChannelMojo outlives ChannelMojoHost because two objects are living in diffent thread. Instead of using lifecycle callbacks, this CL relies on WeakPtr. See comment on ipc_channel_mojo_host.h for more details. This CL also fixes a crash on --single-process mode. R=viettrungluu@chromium.org TBR=jam@chromium.org TEST=content_browsertests (with --enable-renderer-mojo-channel on) BUG=377980 Review URL: https://codereview.chromium.org/599333002 Cr-Commit-Position: refs/heads/master@{#296871}
Diffstat (limited to 'ipc/mojo/ipc_mojo_perftest.cc')
-rw-r--r--ipc/mojo/ipc_mojo_perftest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/mojo/ipc_mojo_perftest.cc b/ipc/mojo/ipc_mojo_perftest.cc
index 576f13e..81dcd70 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -33,7 +33,8 @@ public:
const IPC::ChannelHandle& handle,
base::TaskRunner* runner) OVERRIDE {
host_.reset(new IPC::ChannelMojoHost(task_runner()));
- return IPC::ChannelMojo::CreateServerFactory(host_.get(), handle);
+ return IPC::ChannelMojo::CreateServerFactory(host_->channel_delegate(),
+ handle);
}
virtual bool DidStartClient() OVERRIDE {