| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 struct ReceiveHelloMessage : public SendHelloMessage { | 42 struct ReceiveHelloMessage : public SendHelloMessage { |
| 43 mach_msg_audit_trailer_t audit_trailer; | 43 mach_msg_audit_trailer_t audit_trailer; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| 48 namespace crashpad { | 48 namespace crashpad { |
| 49 namespace test { | 49 namespace test { |
| 50 | 50 |
| 51 using namespace testing; | |
| 52 | |
| 53 namespace internal { | 51 namespace internal { |
| 54 | 52 |
| 55 struct MachMultiprocessInfo { | 53 struct MachMultiprocessInfo { |
| 56 MachMultiprocessInfo() | 54 MachMultiprocessInfo() |
| 57 : service_name(), | 55 : service_name(), |
| 58 local_port(MACH_PORT_NULL), | 56 local_port(MACH_PORT_NULL), |
| 59 remote_port(MACH_PORT_NULL), | 57 remote_port(MACH_PORT_NULL), |
| 60 child_task(MACH_PORT_NULL) {} | 58 child_task(MACH_PORT_NULL) {} |
| 61 | 59 |
| 62 std::string service_name; | 60 std::string service_name; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 262 |
| 265 // Close the write pipe now, for cases where the parent is waiting on it to | 263 // Close the write pipe now, for cases where the parent is waiting on it to |
| 266 // be closed as an indication that the child has finished. | 264 // be closed as an indication that the child has finished. |
| 267 CloseWritePipe(); | 265 CloseWritePipe(); |
| 268 | 266 |
| 269 // Wait for the parent process to close its end of the pipe. The child process | 267 // Wait for the parent process to close its end of the pipe. The child process |
| 270 // needs to remain alive until then because the parent process will attempt to | 268 // needs to remain alive until then because the parent process will attempt to |
| 271 // verify it using the task port it has access to via ChildTask(). | 269 // verify it using the task port it has access to via ChildTask(). |
| 272 CheckedReadFDAtEOF(ReadPipeFD()); | 270 CheckedReadFDAtEOF(ReadPipeFD()); |
| 273 | 271 |
| 274 if (Test::HasFailure()) { | 272 if (testing::Test::HasFailure()) { |
| 275 // Trigger the ScopedForbidReturn destructor. | 273 // Trigger the ScopedForbidReturn destructor. |
| 276 return; | 274 return; |
| 277 } | 275 } |
| 278 | 276 |
| 279 forbid_return.Disarm(); | 277 forbid_return.Disarm(); |
| 280 } | 278 } |
| 281 | 279 |
| 282 } // namespace test | 280 } // namespace test |
| 283 } // namespace crashpad | 281 } // namespace crashpad |
| OLD | NEW |