summaryrefslogtreecommitdiffstats
path: root/ipc/mojo/ipc_channel_mojo.cc
diff options
context:
space:
mode:
authoranujk.sharma <anujk.sharma@samsung.com>2014-08-27 23:49:02 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-28 06:50:11 +0000
commit0184ced8d904d202ad7ab392ef8eca55d83d2937 (patch)
tree215ff2bda703e71a35d960a74e05f1213444cabe /ipc/mojo/ipc_channel_mojo.cc
parent884ad197db2dd93253957c089cd583b8fca4802d (diff)
downloadchromium_src-0184ced8d904d202ad7ab392ef8eca55d83d2937.zip
chromium_src-0184ced8d904d202ad7ab392ef8eca55d83d2937.tar.gz
chromium_src-0184ced8d904d202ad7ab392ef8eca55d83d2937.tar.bz2
Declaring the weak_ptr_factory in proper order.
Cleaning up weak_ptr_factory destruction order in "src/ipc" module. WeakPtrFactory should remain the last member so it'll be destroyed and invalidate its weak pointers before any other members are destroyed. BUG=303818 Review URL: https://codereview.chromium.org/508903002 Cr-Commit-Position: refs/heads/master@{#292334}
Diffstat (limited to 'ipc/mojo/ipc_channel_mojo.cc')
-rw-r--r--ipc/mojo/ipc_channel_mojo.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipc/mojo/ipc_channel_mojo.cc b/ipc/mojo/ipc_channel_mojo.cc
index 2ec9945..88034f1 100644
--- a/ipc/mojo/ipc_channel_mojo.cc
+++ b/ipc/mojo/ipc_channel_mojo.cc
@@ -484,10 +484,10 @@ scoped_ptr<ChannelFactory> ChannelMojo::CreateFactory(
ChannelMojo::ChannelMojo(
scoped_ptr<Channel> bootstrap, Mode mode, Listener* listener,
scoped_refptr<base::TaskRunner> io_thread_task_runner)
- : weak_factory_(this),
- bootstrap_(bootstrap.Pass()),
+ : bootstrap_(bootstrap.Pass()),
mode_(mode), listener_(listener),
- peer_pid_(base::kNullProcessId) {
+ peer_pid_(base::kNullProcessId),
+ weak_factory_(this) {
if (base::MessageLoopProxy::current() == io_thread_task_runner.get()) {
InitOnIOThread();
} else {