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

Side by Side Diff: ipc/ipc_channel_win.cc

Issue 216293008: Add a temporary CHECK to IPC::Channel::Send() to help track down crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_channel_win.h" 5 #include "ipc/ipc_channel_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 while (!output_queue_.empty()) { 76 while (!output_queue_.empty()) {
77 Message* m = output_queue_.front(); 77 Message* m = output_queue_.front();
78 output_queue_.pop(); 78 output_queue_.pop();
79 delete m; 79 delete m;
80 } 80 }
81 } 81 }
82 82
83 bool Channel::ChannelImpl::Send(Message* message) { 83 bool Channel::ChannelImpl::Send(Message* message) {
84 CHECK(message) << "crbug.com/357915"; // TODO(vtl): Remove once bug resolved.
no sievers 2014/03/29 20:48:40 I think we need more sanity checking on the messag
84 DCHECK(thread_check_->CalledOnValidThread()); 85 DCHECK(thread_check_->CalledOnValidThread());
85 DVLOG(2) << "sending message @" << message << " on channel @" << this 86 DVLOG(2) << "sending message @" << message << " on channel @" << this
86 << " with type " << message->type() 87 << " with type " << message->type()
87 << " (" << output_queue_.size() << " in queue)"; 88 << " (" << output_queue_.size() << " in queue)";
88 89
89 #ifdef IPC_MESSAGE_LOG_ENABLED 90 #ifdef IPC_MESSAGE_LOG_ENABLED
90 Logging::GetInstance()->OnSendMessage(message, ""); 91 Logging::GetInstance()->OnSendMessage(message, "");
91 #endif 92 #endif
92 93
93 message->TraceMessageBegin(); 94 message->TraceMessageBegin();
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 int secret; 510 int secret;
510 do { // Guarantee we get a non-zero value. 511 do { // Guarantee we get a non-zero value.
511 secret = base::RandInt(0, std::numeric_limits<int>::max()); 512 secret = base::RandInt(0, std::numeric_limits<int>::max());
512 } while (secret == 0); 513 } while (secret == 0);
513 514
514 id.append(GenerateUniqueRandomChannelID()); 515 id.append(GenerateUniqueRandomChannelID());
515 return id.append(base::StringPrintf("\\%d", secret)); 516 return id.append(base::StringPrintf("\\%d", secret));
516 } 517 }
517 518
518 } // namespace IPC 519 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698