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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // thread-level EXC_CRASH handler. To test that it will fall back to | 221 // thread-level EXC_CRASH handler. To test that it will fall back to |
222 // trying the task-level EXC_CRASH handler, return a failure code, which | 222 // trying the task-level EXC_CRASH handler, return a failure code, which |
223 // should cause SimulateCrash() to try the next target. | 223 // should cause SimulateCrash() to try the next target. |
224 EXPECT_EQ(kExceptionPortsTargetBoth, target_); | 224 EXPECT_EQ(kExceptionPortsTargetBoth, target_); |
225 return KERN_ABORTED; | 225 return KERN_ABORTED; |
226 } | 226 } |
227 | 227 |
228 ExcServerCopyState( | 228 ExcServerCopyState( |
229 behavior, old_state, old_state_count, new_state, new_state_count); | 229 behavior, old_state, old_state_count, new_state, new_state_count); |
230 | 230 |
231 return ExcServerSuccessfulReturnValue(behavior, true); | 231 return ExcServerSuccessfulReturnValue(exception, behavior, true); |
232 } | 232 } |
233 | 233 |
234 private: | 234 private: |
235 // MachMultiprocess: | 235 // MachMultiprocess: |
236 | 236 |
237 void MachMultiprocessParent() override { | 237 void MachMultiprocessParent() override { |
238 if (target_ == kExceptionPortsTargetNone) { | 238 if (target_ == kExceptionPortsTargetNone) { |
239 // The child does not have any EXC_CRASH handlers registered for its | 239 // The child does not have any EXC_CRASH handlers registered for its |
240 // thread or task targets, so no exception message is expected to be | 240 // thread or task targets, so no exception message is expected to be |
241 // generated. Don’t run the server at all. | 241 // generated. Don’t run the server at all. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 test_simulate_crash_mac.Run(); | 377 test_simulate_crash_mac.Run(); |
378 } | 378 } |
379 } | 379 } |
380 } | 380 } |
381 } | 381 } |
382 } | 382 } |
383 | 383 |
384 } // namespace | 384 } // namespace |
385 } // namespace test | 385 } // namespace test |
386 } // namespace crashpad | 386 } // namespace crashpad |
OLD | NEW |