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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 base::AutoReset<internal::MachMultiprocessInfo*> reset_info(&info_, | 75 base::AutoReset<internal::MachMultiprocessInfo*> reset_info(&info_, |
76 info.get()); | 76 info.get()); |
77 | 77 |
78 return Multiprocess::Run(); | 78 return Multiprocess::Run(); |
79 } | 79 } |
80 | 80 |
81 MachMultiprocess::~MachMultiprocess() { | 81 MachMultiprocess::~MachMultiprocess() { |
82 } | 82 } |
83 | 83 |
84 void MachMultiprocess::PreFork() { | 84 void MachMultiprocess::PreFork() { |
85 Multiprocess::PreFork(); | 85 ASSERT_NO_FATAL_FAILURE(Multiprocess::PreFork()); |
86 if (testing::Test::HasFatalFailure()) { | |
87 return; | |
88 } | |
89 | 86 |
90 // Set up the parent port and register it with the bootstrap server before | 87 // Set up the parent port and register it with the bootstrap server before |
91 // forking, so that it’s guaranteed to be there when the child attempts to | 88 // forking, so that it’s guaranteed to be there when the child attempts to |
92 // look it up. | 89 // look it up. |
93 info_->service_name = "com.googlecode.crashpad.test.mach_multiprocess."; | 90 info_->service_name = "com.googlecode.crashpad.test.mach_multiprocess."; |
94 for (int index = 0; index < 16; ++index) { | 91 for (int index = 0; index < 16; ++index) { |
95 info_->service_name.append(1, base::RandInt('A', 'Z')); | 92 info_->service_name.append(1, base::RandInt('A', 'Z')); |
96 } | 93 } |
97 | 94 |
98 mach_port_t local_port; | 95 mach_port_t local_port; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 if (testing::Test::HasFailure()) { | 269 if (testing::Test::HasFailure()) { |
273 // Trigger the ScopedForbidReturn destructor. | 270 // Trigger the ScopedForbidReturn destructor. |
274 return; | 271 return; |
275 } | 272 } |
276 | 273 |
277 forbid_return.Disarm(); | 274 forbid_return.Disarm(); |
278 } | 275 } |
279 | 276 |
280 } // namespace test | 277 } // namespace test |
281 } // namespace crashpad | 278 } // namespace crashpad |
OLD | NEW |