Index: content/child/child_thread.cc |
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc |
index 95b36c6dcff26f4482ce3818ae4dfcc5179cdbe5..2b7a9643a2d7c0b76fd1d9ddf5555b4bfb1969a4 100644 |
--- a/content/child/child_thread.cc |
+++ b/content/child/child_thread.cc |
@@ -133,7 +133,8 @@ void QuitMainThreadMessageLoop() { |
} // namespace |
ChildThread::ChildThread() |
- : channel_connected_factory_(this) { |
+ : channel_connected_factory_(this), |
+ in_browser_process_(false) { |
channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
switches::kProcessChannelID); |
Init(); |
@@ -141,7 +142,8 @@ ChildThread::ChildThread() |
ChildThread::ChildThread(const std::string& channel_name) |
: channel_name_(channel_name), |
- channel_connected_factory_(this) { |
+ channel_connected_factory_(this), |
+ in_browser_process_(true) { |
Init(); |
} |
@@ -163,7 +165,8 @@ void ChildThread::Init() { |
true, |
ChildProcess::current()->GetShutDownEvent())); |
#ifdef IPC_MESSAGE_LOG_ENABLED |
- IPC::Logging::GetInstance()->SetIPCSender(this); |
+ if (!in_browser_process_) |
+ IPC::Logging::GetInstance()->SetIPCSender(this); |
#endif |
sync_message_filter_ = |
@@ -284,7 +287,7 @@ void ChildThread::OnChannelError() { |
} |
bool ChildThread::Send(IPC::Message* msg) { |
- DCHECK(base::MessageLoop::current() == message_loop()); |
+ DCHECK(in_browser_process_ || base::MessageLoop::current() == message_loop()); |
jam
2013/10/24 16:49:04
why is this needed?
|
if (!channel_) { |
delete msg; |
return false; |