OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 mach_port_t MachMultiprocess::LocalPort() const { | 108 mach_port_t MachMultiprocess::LocalPort() const { |
109 EXPECT_NE(kMachPortNull, info_->local_port); | 109 EXPECT_NE(kMachPortNull, info_->local_port); |
110 return info_->local_port; | 110 return info_->local_port; |
111 } | 111 } |
112 | 112 |
113 mach_port_t MachMultiprocess::RemotePort() const { | 113 mach_port_t MachMultiprocess::RemotePort() const { |
114 EXPECT_NE(kMachPortNull, info_->remote_port); | 114 EXPECT_NE(kMachPortNull, info_->remote_port); |
115 return info_->remote_port; | 115 return info_->remote_port; |
116 } | 116 } |
117 | 117 |
118 mach_port_t MachMultiprocess::ChildTask() const { | 118 task_t MachMultiprocess::ChildTask() const { |
119 EXPECT_NE(kMachPortNull, info_->child_task); | 119 EXPECT_NE(kMachPortNull, info_->child_task); |
120 return info_->child_task; | 120 return info_->child_task; |
121 } | 121 } |
122 | 122 |
123 void MachMultiprocess::MultiprocessParent() { | 123 void MachMultiprocess::MultiprocessParent() { |
124 ReceiveHelloMessage message = {}; | 124 ReceiveHelloMessage message = {}; |
125 | 125 |
126 kern_return_t kr = | 126 kern_return_t kr = |
127 mach_msg(&message.header, | 127 mach_msg(&message.header, |
128 MACH_RCV_MSG | MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0) | | 128 MACH_RCV_MSG | MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0) | |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 if (Test::HasFailure()) { | 264 if (Test::HasFailure()) { |
265 // Trigger the ScopedForbidReturn destructor. | 265 // Trigger the ScopedForbidReturn destructor. |
266 return; | 266 return; |
267 } | 267 } |
268 | 268 |
269 forbid_return.Disarm(); | 269 forbid_return.Disarm(); |
270 } | 270 } |
271 | 271 |
272 } // namespace test | 272 } // namespace test |
273 } // namespace crashpad | 273 } // namespace crashpad |
OLD | NEW |