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

Side by Side Diff: mojo/edk/system/message_pipe_dispatcher.cc

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « mojo/edk/system/data_pipe_producer_dispatcher.cc ('k') | mojo/edk/system/node_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/edk/system/message_pipe_dispatcher.h" 5 #include "mojo/edk/system/message_pipe_dispatcher.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_WRITABLE; 632 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_WRITABLE;
633 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_READABLE; 633 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_READABLE;
634 } else { 634 } else {
635 rv.satisfied_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED; 635 rv.satisfied_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED;
636 } 636 }
637 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED; 637 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED;
638 return rv; 638 return rv;
639 } 639 }
640 640
641 void MessagePipeDispatcher::OnPortStatusChanged() { 641 void MessagePipeDispatcher::OnPortStatusChanged() {
642 RequestContext request_context; 642 DCHECK(RequestContext::current());
643 643
644 base::AutoLock lock(signal_lock_); 644 base::AutoLock lock(signal_lock_);
645 645
646 // We stop observing our port as soon as it's transferred, but this can race 646 // We stop observing our port as soon as it's transferred, but this can race
647 // with events which are raised right before that happens. This is fine to 647 // with events which are raised right before that happens. This is fine to
648 // ignore. 648 // ignore.
649 if (port_transferred_) 649 if (port_transferred_)
650 return; 650 return;
651 651
652 #if !defined(NDEBUG) 652 #if !defined(NDEBUG)
(...skipping 15 matching lines...) Expand all
668 DVLOG(1) << "Peer closure detected on message pipe " << pipe_id_ 668 DVLOG(1) << "Peer closure detected on message pipe " << pipe_id_
669 << " endpoint " << endpoint_ << " [port=" << port_.name() << "]"; 669 << " endpoint " << endpoint_ << " [port=" << port_.name() << "]";
670 } 670 }
671 #endif 671 #endif
672 672
673 awakables_.AwakeForStateChange(GetHandleSignalsStateNoLock()); 673 awakables_.AwakeForStateChange(GetHandleSignalsStateNoLock());
674 } 674 }
675 675
676 } // namespace edk 676 } // namespace edk
677 } // namespace mojo 677 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/data_pipe_producer_dispatcher.cc ('k') | mojo/edk/system/node_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698