OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_message.h" | 5 #include "ipc/ipc_message.h" |
6 | 6 |
7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void Message::InitLoggingVariables() { | 77 void Message::InitLoggingVariables() { |
78 #ifdef IPC_MESSAGE_LOG_ENABLED | 78 #ifdef IPC_MESSAGE_LOG_ENABLED |
79 received_time_ = 0; | 79 received_time_ = 0; |
80 dont_log_ = false; | 80 dont_log_ = false; |
81 log_data_ = NULL; | 81 log_data_ = NULL; |
82 #endif | 82 #endif |
83 } | 83 } |
84 | 84 |
85 Message& Message::operator=(const Message& other) { | 85 Message& Message::operator=(const Message& other) { |
86 *static_cast<Pickle*>(this) = other; | 86 *static_cast<Pickle*>(this) = other; |
| 87 // TODO(vtl): Remove once bug resolved. |
| 88 CHECK(header()) << "crbug.com/357915"; |
87 #if defined(OS_POSIX) | 89 #if defined(OS_POSIX) |
88 file_descriptor_set_ = other.file_descriptor_set_; | 90 file_descriptor_set_ = other.file_descriptor_set_; |
89 #endif | 91 #endif |
90 return *this; | 92 return *this; |
91 } | 93 } |
92 | 94 |
93 void Message::SetHeaderValues(int32 routing, uint32 type, uint32 flags) { | 95 void Message::SetHeaderValues(int32 routing, uint32 type, uint32 flags) { |
94 // This should only be called when the message is already empty. | 96 // This should only be called when the message is already empty. |
95 DCHECK(payload_size() == 0); | 97 DCHECK(payload_size() == 0); |
96 | 98 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 155 } |
154 | 156 |
155 void Message::EnsureFileDescriptorSet() { | 157 void Message::EnsureFileDescriptorSet() { |
156 if (file_descriptor_set_.get() == NULL) | 158 if (file_descriptor_set_.get() == NULL) |
157 file_descriptor_set_ = new FileDescriptorSet; | 159 file_descriptor_set_ = new FileDescriptorSet; |
158 } | 160 } |
159 | 161 |
160 #endif | 162 #endif |
161 | 163 |
162 } // namespace IPC | 164 } // namespace IPC |
OLD | NEW |