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

Unified Diff: mojo/system/message_pipe_dispatcher.cc

Issue 227133013: Mojo: Dispatcher::MessageInTransitAccess functions don't need to take the lock. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/system/message_in_transit.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_dispatcher.cc
diff --git a/mojo/system/message_pipe_dispatcher.cc b/mojo/system/message_pipe_dispatcher.cc
index bf9e5b036f486733a7ab1cb14b5acd7e7022b295..a22b3a716dac3539d124b70073e1dd7b19efec88 100644
--- a/mojo/system/message_pipe_dispatcher.cc
+++ b/mojo/system/message_pipe_dispatcher.cc
@@ -174,14 +174,14 @@ void MessagePipeDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) {
size_t MessagePipeDispatcher::GetMaximumSerializedSizeImplNoLock(
const Channel* /*channel*/) const {
- lock().AssertAcquired();
+ DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
return sizeof(SerializedMessagePipeDispatcher);
}
bool MessagePipeDispatcher::SerializeAndCloseImplNoLock(Channel* channel,
void* destination,
size_t* actual_size) {
- lock().AssertAcquired();
+ DCHECK(HasOneRef()); // Only one ref => no need to take the lock.
// Convert the local endpoint to a proxy endpoint (moving the message queue).
message_pipe_->ConvertLocalToProxy(port_);
« no previous file with comments | « mojo/system/message_in_transit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698