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

Side by Side Diff: mojo/system/message_in_transit.cc

Issue 240133005: Mojo: Make some attempts towards fixing remote message pipe closure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some locking issues 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/system/message_in_transit.h ('k') | mojo/system/message_pipe.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/system/message_in_transit.h" 5 #include "mojo/system/message_in_transit.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <new> 9 #include <new>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type 43 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type
44 MessageInTransit::kTypeMessagePipeEndpoint; 44 MessageInTransit::kTypeMessagePipeEndpoint;
45 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type 45 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type
46 MessageInTransit::kTypeMessagePipe; 46 MessageInTransit::kTypeMessagePipe;
47 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type 47 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type
48 MessageInTransit::kTypeChannel; 48 MessageInTransit::kTypeChannel;
49 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype 49 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype
50 MessageInTransit::kSubtypeMessagePipeEndpointData; 50 MessageInTransit::kSubtypeMessagePipeEndpointData;
51 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype 51 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype
52 MessageInTransit::kSubtypeMessagePipePeerClosed; 52 MessageInTransit::kSubtypeChannelRunMessagePipeEndpoint;
53 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype
54 MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpoint;
55 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype
56 MessageInTransit::kSubtypeChannelRemoveMessagePipeEndpointAck;
53 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::EndpointId 57 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::EndpointId
54 MessageInTransit::kInvalidEndpointId; 58 MessageInTransit::kInvalidEndpointId;
55 STATIC_CONST_MEMBER_DEFINITION const size_t MessageInTransit::kMessageAlignment; 59 STATIC_CONST_MEMBER_DEFINITION const size_t MessageInTransit::kMessageAlignment;
56 STATIC_CONST_MEMBER_DEFINITION const size_t 60 STATIC_CONST_MEMBER_DEFINITION const size_t
57 MessageInTransit::kMaxSerializedDispatcherSize; 61 MessageInTransit::kMaxSerializedDispatcherSize;
58 STATIC_CONST_MEMBER_DEFINITION const size_t 62 STATIC_CONST_MEMBER_DEFINITION const size_t
59 MessageInTransit::kMaxSerializedDispatcherPlatformHandles; 63 MessageInTransit::kMaxSerializedDispatcherPlatformHandles;
60 64
61 // For each attached (Mojo) handle, there'll be a handle table entry and 65 // For each attached (Mojo) handle, there'll be a handle table entry and
62 // serialized dispatcher data. 66 // serialized dispatcher data.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 399
396 void MessageInTransit::UpdateTotalSize() { 400 void MessageInTransit::UpdateTotalSize() {
397 DCHECK_EQ(main_buffer_size_ % kMessageAlignment, 0u); 401 DCHECK_EQ(main_buffer_size_ % kMessageAlignment, 0u);
398 DCHECK_EQ(secondary_buffer_size_ % kMessageAlignment, 0u); 402 DCHECK_EQ(secondary_buffer_size_ % kMessageAlignment, 0u);
399 header()->total_size = 403 header()->total_size =
400 static_cast<uint32_t>(main_buffer_size_ + secondary_buffer_size_); 404 static_cast<uint32_t>(main_buffer_size_ + secondary_buffer_size_);
401 } 405 }
402 406
403 } // namespace system 407 } // namespace system
404 } // namespace mojo 408 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/message_in_transit.h ('k') | mojo/system/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698