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

Side by Side Diff: client/simulate_crash_mac.cc

Issue 700143004: C++11: Use type aliases instead of typedefs (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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 | « client/simple_string_dictionary_test.cc ('k') | compat/mac/mach-o/getsect.h » ('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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 kern_return_t kr; 64 kern_return_t kr;
65 65
66 bool handler_wants_state = ExceptionBehaviorHasState(handler.behavior); 66 bool handler_wants_state = ExceptionBehaviorHasState(handler.behavior);
67 if (!handler_wants_state) { 67 if (!handler_wants_state) {
68 // Regardless of the passed-in value of |set_state|, if the handler won’t be 68 // Regardless of the passed-in value of |set_state|, if the handler won’t be
69 // dealing with any state at all, no state should be set. 69 // dealing with any state at all, no state should be set.
70 set_state = false; 70 set_state = false;
71 } 71 }
72 72
73 // A const version of thread_state_t. 73 // A const version of thread_state_t.
74 typedef const natural_t* ConstThreadState; 74 using ConstThreadState = const natural_t*;
75 75
76 // old_state is only used if the context already captured doesn’t match (or 76 // old_state is only used if the context already captured doesn’t match (or
77 // can’t be converted to) what’s registered for the handler. 77 // can’t be converted to) what’s registered for the handler.
78 thread_state_data_t old_state; 78 thread_state_data_t old_state;
79 79
80 thread_state_flavor_t flavor = handler.flavor; 80 thread_state_flavor_t flavor = handler.flavor;
81 ConstThreadState state; 81 ConstThreadState state;
82 mach_msg_type_number_t state_count; 82 mach_msg_type_number_t state_count;
83 switch (flavor) { 83 switch (flavor) {
84 #if defined(ARCH_CPU_X86_FAMILY) 84 #if defined(ARCH_CPU_X86_FAMILY)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 false); 235 false);
236 } 236 }
237 } 237 }
238 } 238 }
239 239
240 LOG_IF(WARNING, !success) 240 LOG_IF(WARNING, !success)
241 << "SimulateCrash did not find an appropriate exception handler"; 241 << "SimulateCrash did not find an appropriate exception handler";
242 } 242 }
243 243
244 } // namespace crashpad 244 } // namespace crashpad
OLDNEW
« no previous file with comments | « client/simple_string_dictionary_test.cc ('k') | compat/mac/mach-o/getsect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698