| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 ASSERT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "pid_for_task"); | 200 ASSERT_EQ(KERN_SUCCESS, kr) << MachErrorMessage(kr, "pid_for_task"); |
| 201 ASSERT_EQ(ChildPID(), mach_pid); | 201 ASSERT_EQ(ChildPID(), mach_pid); |
| 202 | 202 |
| 203 MachMultiprocessParent(); | 203 MachMultiprocessParent(); |
| 204 | 204 |
| 205 info_->remote_port.reset(); | 205 info_->remote_port.reset(); |
| 206 info_->local_port.reset(); | 206 info_->local_port.reset(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void MachMultiprocess::MultiprocessChild() { | 209 void MachMultiprocess::MultiprocessChild() { |
| 210 ScopedForbidReturn forbid_return;; | 210 ScopedForbidReturn forbid_return; |
| 211 | 211 |
| 212 // local_port is not valid in the forked child process. | 212 // local_port is not valid in the forked child process. |
| 213 ignore_result(info_->local_port.release()); | 213 ignore_result(info_->local_port.release()); |
| 214 | 214 |
| 215 info_->local_port.reset(NewMachPort(MACH_PORT_RIGHT_RECEIVE)); | 215 info_->local_port.reset(NewMachPort(MACH_PORT_RIGHT_RECEIVE)); |
| 216 ASSERT_NE(kMachPortNull, info_->local_port); | 216 ASSERT_NE(kMachPortNull, info_->local_port); |
| 217 | 217 |
| 218 // The remote port can be obtained from the bootstrap server. | 218 // The remote port can be obtained from the bootstrap server. |
| 219 info_->remote_port = BootstrapLookUp(info_->service_name); | 219 info_->remote_port = BootstrapLookUp(info_->service_name); |
| 220 ASSERT_NE(kMachPortNull, info_->remote_port); | 220 ASSERT_NE(kMachPortNull, info_->remote_port); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 if (testing::Test::HasFailure()) { | 260 if (testing::Test::HasFailure()) { |
| 261 // Trigger the ScopedForbidReturn destructor. | 261 // Trigger the ScopedForbidReturn destructor. |
| 262 return; | 262 return; |
| 263 } | 263 } |
| 264 | 264 |
| 265 forbid_return.Disarm(); | 265 forbid_return.Disarm(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace test | 268 } // namespace test |
| 269 } // namespace crashpad | 269 } // namespace crashpad |
| OLD | NEW |