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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 // MachMultiprocess: | 1039 // MachMultiprocess: |
1040 | 1040 |
1041 void MachMultiprocessParent() override { | 1041 void MachMultiprocessParent() override { |
1042 UniversalMachExcServer universal_mach_exc_server(this); | 1042 UniversalMachExcServer universal_mach_exc_server(this); |
1043 | 1043 |
1044 kern_return_t kr = | 1044 kern_return_t kr = |
1045 MachMessageServer::Run(&universal_mach_exc_server, | 1045 MachMessageServer::Run(&universal_mach_exc_server, |
1046 LocalPort(), | 1046 LocalPort(), |
1047 kMachMessageOptions, | 1047 kMachMessageOptions, |
1048 MachMessageServer::kOneShot, | 1048 MachMessageServer::kOneShot, |
1049 MachMessageServer::kBlocking, | |
1050 MachMessageServer::kReceiveLargeError, | 1049 MachMessageServer::kReceiveLargeError, |
1051 0); | 1050 kMachMessageTimeoutWaitIndefinitely); |
1052 EXPECT_EQ(KERN_SUCCESS, kr) | 1051 EXPECT_EQ(KERN_SUCCESS, kr) |
1053 << MachErrorMessage(kr, "MachMessageServer::Run"); | 1052 << MachErrorMessage(kr, "MachMessageServer::Run"); |
1054 | 1053 |
1055 EXPECT_TRUE(handled_); | 1054 EXPECT_TRUE(handled_); |
1056 } | 1055 } |
1057 | 1056 |
1058 void MachMultiprocessChild() override { | 1057 void MachMultiprocessChild() override { |
1059 // Set the parent as the exception handler for EXC_CRASH. | 1058 // Set the parent as the exception handler for EXC_CRASH. |
1060 kern_return_t kr = task_set_exception_ports( | 1059 kern_return_t kr = task_set_exception_ports( |
1061 mach_task_self(), EXC_MASK_CRASH, RemotePort(), behavior_, flavor_); | 1060 mach_task_self(), EXC_MASK_CRASH, RemotePort(), behavior_, flavor_); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 | 1271 |
1273 EXPECT_EQ(test_data.kr, | 1272 EXPECT_EQ(test_data.kr, |
1274 ExcServerSuccessfulReturnValue(test_data.behavior, | 1273 ExcServerSuccessfulReturnValue(test_data.behavior, |
1275 test_data.set_thread_state)); | 1274 test_data.set_thread_state)); |
1276 } | 1275 } |
1277 } | 1276 } |
1278 | 1277 |
1279 } // namespace | 1278 } // namespace |
1280 } // namespace test | 1279 } // namespace test |
1281 } // namespace crashpad | 1280 } // namespace crashpad |
OLD | NEW |