| 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 EXPECT_EQ(nullptr, new_state); | 933 EXPECT_EQ(nullptr, new_state); |
| 934 } | 934 } |
| 935 | 935 |
| 936 return ExcServerSuccessfulReturnValue(behavior, false); | 936 return ExcServerSuccessfulReturnValue(behavior, false); |
| 937 } | 937 } |
| 938 | 938 |
| 939 private: | 939 private: |
| 940 // MachMultiprocess: | 940 // MachMultiprocess: |
| 941 | 941 |
| 942 void MachMultiprocessParent() override { | 942 void MachMultiprocessParent() override { |
| 943 kern_return_t kr = MachMessageServer::Run(this, | 943 kern_return_t kr = |
| 944 LocalPort(), | 944 MachMessageServer::Run(this, |
| 945 MACH_MSG_OPTION_NONE, | 945 LocalPort(), |
| 946 MachMessageServer::kOneShot, | 946 MACH_MSG_OPTION_NONE, |
| 947 MachMessageServer::kBlocking, | 947 MachMessageServer::kOneShot, |
| 948 0); | 948 MachMessageServer::kBlocking, |
| 949 MachMessageServer::kReceiveLargeError, |
| 950 0); |
| 949 EXPECT_EQ(KERN_SUCCESS, kr) | 951 EXPECT_EQ(KERN_SUCCESS, kr) |
| 950 << MachErrorMessage(kr, "MachMessageServer::Run"); | 952 << MachErrorMessage(kr, "MachMessageServer::Run"); |
| 951 | 953 |
| 952 EXPECT_TRUE(handled_); | 954 EXPECT_TRUE(handled_); |
| 953 } | 955 } |
| 954 | 956 |
| 955 void MachMultiprocessChild() override { | 957 void MachMultiprocessChild() override { |
| 956 // Set the parent as the exception handler for EXC_CRASH. | 958 // Set the parent as the exception handler for EXC_CRASH. |
| 957 kern_return_t kr = task_set_exception_ports( | 959 kern_return_t kr = task_set_exception_ports( |
| 958 mach_task_self(), EXC_MASK_CRASH, RemotePort(), behavior_, flavor_); | 960 mach_task_self(), EXC_MASK_CRASH, RemotePort(), behavior_, flavor_); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 | 1168 |
| 1167 EXPECT_EQ(test_data.kr, | 1169 EXPECT_EQ(test_data.kr, |
| 1168 ExcServerSuccessfulReturnValue(test_data.behavior, | 1170 ExcServerSuccessfulReturnValue(test_data.behavior, |
| 1169 test_data.set_thread_state)); | 1171 test_data.set_thread_state)); |
| 1170 } | 1172 } |
| 1171 } | 1173 } |
| 1172 | 1174 |
| 1173 } // namespace | 1175 } // namespace |
| 1174 } // namespace test | 1176 } // namespace test |
| 1175 } // namespace crashpad | 1177 } // namespace crashpad |
| OLD | NEW |