| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 system_.Initialize(&process_reader_, &snapshot_time_); | 50 system_.Initialize(&process_reader_, &snapshot_time_); |
| 51 | 51 |
| 52 InitializeThreads(); | 52 InitializeThreads(); |
| 53 InitializeModules(); | 53 InitializeModules(); |
| 54 | 54 |
| 55 INITIALIZATION_STATE_SET_VALID(initialized_); | 55 INITIALIZATION_STATE_SET_VALID(initialized_); |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool ProcessSnapshotMac::InitializeException( | 59 bool ProcessSnapshotMac::InitializeException( |
| 60 exception_behavior_t behavior, |
| 60 thread_t exception_thread, | 61 thread_t exception_thread, |
| 61 exception_type_t exception, | 62 exception_type_t exception, |
| 62 const mach_exception_data_type_t* code, | 63 const mach_exception_data_type_t* code, |
| 63 mach_msg_type_number_t code_count, | 64 mach_msg_type_number_t code_count, |
| 64 thread_state_flavor_t flavor, | 65 thread_state_flavor_t flavor, |
| 65 const natural_t* state, | 66 const natural_t* state, |
| 66 mach_msg_type_number_t state_count) { | 67 mach_msg_type_number_t state_count) { |
| 67 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 68 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 68 DCHECK(!exception_); | 69 DCHECK(!exception_); |
| 69 | 70 |
| 70 exception_.reset(new internal::ExceptionSnapshotMac()); | 71 exception_.reset(new internal::ExceptionSnapshotMac()); |
| 71 if (!exception_->Initialize(&process_reader_, | 72 if (!exception_->Initialize(&process_reader_, |
| 73 behavior, |
| 72 exception_thread, | 74 exception_thread, |
| 73 exception, | 75 exception, |
| 74 code, | 76 code, |
| 75 code_count, | 77 code_count, |
| 76 flavor, | 78 flavor, |
| 77 state, | 79 state, |
| 78 state_count)) { | 80 state_count)) { |
| 79 exception_.reset(); | 81 exception_.reset(); |
| 80 return false; | 82 return false; |
| 81 } | 83 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 for (const ProcessReader::Module& process_reader_module : | 203 for (const ProcessReader::Module& process_reader_module : |
| 202 process_reader_modules) { | 204 process_reader_modules) { |
| 203 auto module = make_scoped_ptr(new internal::ModuleSnapshotMac()); | 205 auto module = make_scoped_ptr(new internal::ModuleSnapshotMac()); |
| 204 if (module->Initialize(&process_reader_, process_reader_module)) { | 206 if (module->Initialize(&process_reader_, process_reader_module)) { |
| 205 modules_.push_back(module.release()); | 207 modules_.push_back(module.release()); |
| 206 } | 208 } |
| 207 } | 209 } |
| 208 } | 210 } |
| 209 | 211 |
| 210 } // namespace crashpad | 212 } // namespace crashpad |
| OLD | NEW |