Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: content/child/child_thread.cc

Issue 32283003: Fix crash with IPC_MESSAGE_LOG_ENABLED when running in single-process mode or in-process-gpu. The … (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/child_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/child/child_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698