Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: client/simulate_crash_mac_test.cc

Issue 1049023003: Add ExcServerCopyState() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | handler/mac/crash_report_exception_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 if (!succeed_) { 218 if (!succeed_) {
219 // The client has registered EXC_CRASH handlers for both its thread and 219 // The client has registered EXC_CRASH handlers for both its thread and
220 // task targets, and sent a simulated exception message to its 220 // task targets, and sent a simulated exception message to its
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(
229 behavior, old_state, old_state_count, new_state, new_state_count);
230
228 return ExcServerSuccessfulReturnValue(behavior, true); 231 return ExcServerSuccessfulReturnValue(behavior, true);
229 } 232 }
230 233
231 private: 234 private:
232 // MachMultiprocess: 235 // MachMultiprocess:
233 236
234 void MachMultiprocessParent() override { 237 void MachMultiprocessParent() override {
235 if (target_ == kExceptionPortsTargetNone) { 238 if (target_ == kExceptionPortsTargetNone) {
236 // 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
237 // 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
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 test_simulate_crash_mac.Run(); 377 test_simulate_crash_mac.Run();
375 } 378 }
376 } 379 }
377 } 380 }
378 } 381 }
379 } 382 }
380 383
381 } // namespace 384 } // namespace
382 } // namespace test 385 } // namespace test
383 } // namespace crashpad 386 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | handler/mac/crash_report_exception_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698