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

Side by Side Diff: ipc/ipc_channel_win.cc

Issue 218433002: Temporary CHECK version 2 in 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 // TODO(vtl): Remove once bug resolved.
85 CHECK(message && message->data()) << "crbug.com/357915";
84 DCHECK(thread_check_->CalledOnValidThread()); 86 DCHECK(thread_check_->CalledOnValidThread());
85 DVLOG(2) << "sending message @" << message << " on channel @" << this 87 DVLOG(2) << "sending message @" << message << " on channel @" << this
86 << " with type " << message->type() 88 << " with type " << message->type()
87 << " (" << output_queue_.size() << " in queue)"; 89 << " (" << output_queue_.size() << " in queue)";
88 90
89 #ifdef IPC_MESSAGE_LOG_ENABLED 91 #ifdef IPC_MESSAGE_LOG_ENABLED
90 Logging::GetInstance()->OnSendMessage(message, ""); 92 Logging::GetInstance()->OnSendMessage(message, "");
91 #endif 93 #endif
92 94
93 message->TraceMessageBegin(); 95 message->TraceMessageBegin();
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 int secret; 511 int secret;
510 do { // Guarantee we get a non-zero value. 512 do { // Guarantee we get a non-zero value.
511 secret = base::RandInt(0, std::numeric_limits<int>::max()); 513 secret = base::RandInt(0, std::numeric_limits<int>::max());
512 } while (secret == 0); 514 } while (secret == 0);
513 515
514 id.append(GenerateUniqueRandomChannelID()); 516 id.append(GenerateUniqueRandomChannelID());
515 return id.append(base::StringPrintf("\\%d", secret)); 517 return id.append(base::StringPrintf("\\%d", secret));
516 } 518 }
517 519
518 } // namespace IPC 520 } // 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