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_); |