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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 3337004: Fix a chrome browser crash observed in chrome frame reliability test runs. Th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | « no previous file | ipc/ipc_sync_channel.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/ref_counted.h" 6 #include "base/ref_counted.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "base/thread.h" 8 #include "base/thread.h"
9 #include "ipc/ipc_channel_proxy.h" 9 #include "ipc/ipc_channel_proxy.h"
10 #include "ipc/ipc_logging.h" 10 #include "ipc/ipc_logging.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 delete channel_; 148 delete channel_;
149 channel_ = NULL; 149 channel_ = NULL;
150 150
151 // Balance with the reference taken during startup. This may result in 151 // Balance with the reference taken during startup. This may result in
152 // self-destruction. 152 // self-destruction.
153 Release(); 153 Release();
154 } 154 }
155 155
156 // Called on the IPC::Channel thread 156 // Called on the IPC::Channel thread
157 void ChannelProxy::Context::OnSendMessage(Message* message) { 157 void ChannelProxy::Context::OnSendMessage(Message* message) {
158 if (!channel_) {
159 delete message;
160 OnChannelClosed();
161 return;
162 }
158 if (!channel_->Send(message)) 163 if (!channel_->Send(message))
159 OnChannelError(); 164 OnChannelError();
160 } 165 }
161 166
162 // Called on the IPC::Channel thread 167 // Called on the IPC::Channel thread
163 void ChannelProxy::Context::OnAddFilter(MessageFilter* filter) { 168 void ChannelProxy::Context::OnAddFilter(MessageFilter* filter) {
164 filters_.push_back(filter); 169 filters_.push_back(filter);
165 170
166 // If the channel has already been created, then we need to send this message 171 // If the channel has already been created, then we need to send this message
167 // so that the filter gets access to the Channel. 172 // so that the filter gets access to the Channel.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 int ChannelProxy::GetClientFileDescriptor() const { 312 int ChannelProxy::GetClientFileDescriptor() const {
308 Channel *channel = context_.get()->channel_; 313 Channel *channel = context_.get()->channel_;
309 DCHECK(channel); // Channel must have been created first. 314 DCHECK(channel); // Channel must have been created first.
310 return channel->GetClientFileDescriptor(); 315 return channel->GetClientFileDescriptor();
311 } 316 }
312 #endif 317 #endif
313 318
314 //----------------------------------------------------------------------------- 319 //-----------------------------------------------------------------------------
315 320
316 } // namespace IPC 321 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698