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

Side by Side Diff: ipc/ipc_sync_channel.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 | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_sync_channel_unittest.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 "ipc/ipc_sync_channel.h" 5 #include "ipc/ipc_sync_channel.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/thread_local.h" 9 #include "base/thread_local.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 shutdown_watcher_.StopWatching(); 313 shutdown_watcher_.StopWatching();
314 Context::OnChannelError(); 314 Context::OnChannelError();
315 } 315 }
316 316
317 void SyncChannel::SyncContext::OnChannelOpened() { 317 void SyncChannel::SyncContext::OnChannelOpened() {
318 shutdown_watcher_.StartWatching(shutdown_event_, this); 318 shutdown_watcher_.StartWatching(shutdown_event_, this);
319 Context::OnChannelOpened(); 319 Context::OnChannelOpened();
320 } 320 }
321 321
322 void SyncChannel::SyncContext::OnChannelClosed() { 322 void SyncChannel::SyncContext::OnChannelClosed() {
323 CancelPendingSends();
323 shutdown_watcher_.StopWatching(); 324 shutdown_watcher_.StopWatching();
324 Context::OnChannelClosed(); 325 Context::OnChannelClosed();
325 } 326 }
326 327
327 void SyncChannel::SyncContext::OnSendTimeout(int message_id) { 328 void SyncChannel::SyncContext::OnSendTimeout(int message_id) {
328 AutoLock auto_lock(deserializers_lock_); 329 AutoLock auto_lock(deserializers_lock_);
329 PendingSyncMessageQueue::iterator iter; 330 PendingSyncMessageQueue::iterator iter;
330 for (iter = deserializers_.begin(); iter != deserializers_.end(); iter++) { 331 for (iter = deserializers_.begin(); iter != deserializers_.end(); iter++) {
331 if (iter->id == message_id) { 332 if (iter->id == message_id) {
332 iter->done_event->Signal(); 333 iter->done_event->Signal();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) { 485 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) {
485 DCHECK(event == sync_context()->GetDispatchEvent()); 486 DCHECK(event == sync_context()->GetDispatchEvent());
486 // The call to DispatchMessages might delete this object, so reregister 487 // The call to DispatchMessages might delete this object, so reregister
487 // the object watcher first. 488 // the object watcher first.
488 event->Reset(); 489 event->Reset();
489 dispatch_watcher_.StartWatching(event, this); 490 dispatch_watcher_.StartWatching(event, this);
490 sync_context()->DispatchMessages(); 491 sync_context()->DispatchMessages();
491 } 492 }
492 493
493 } // namespace IPC 494 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698