| OLD | NEW |
| 1 // Copyright (c) 2010 Google Inc. | 1 // Copyright (c) 2010 Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 callback_context_(callback_context), | 226 callback_context_(callback_context), |
| 227 minidump_descriptor_(descriptor), | 227 minidump_descriptor_(descriptor), |
| 228 crash_handler_(NULL) { | 228 crash_handler_(NULL) { |
| 229 if (server_fd >= 0) | 229 if (server_fd >= 0) |
| 230 crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd)); | 230 crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd)); |
| 231 | 231 |
| 232 if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && | 232 if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && |
| 233 !minidump_descriptor_.IsMicrodumpOnConsole()) | 233 !minidump_descriptor_.IsMicrodumpOnConsole()) |
| 234 minidump_descriptor_.UpdatePath(); | 234 minidump_descriptor_.UpdatePath(); |
| 235 | 235 |
| 236 #if defined(__ANDROID__) |
| 237 if (minidump_descriptor_.IsMicrodumpOnConsole()) |
| 238 logger::initializeCrashLogWriter(); |
| 239 #endif |
| 240 |
| 236 pthread_mutex_lock(&g_handler_stack_mutex_); | 241 pthread_mutex_lock(&g_handler_stack_mutex_); |
| 237 if (!g_handler_stack_) | 242 if (!g_handler_stack_) |
| 238 g_handler_stack_ = new std::vector<ExceptionHandler*>; | 243 g_handler_stack_ = new std::vector<ExceptionHandler*>; |
| 239 if (install_handler) { | 244 if (install_handler) { |
| 240 InstallAlternateStackLocked(); | 245 InstallAlternateStackLocked(); |
| 241 InstallHandlersLocked(); | 246 InstallHandlersLocked(); |
| 242 } | 247 } |
| 243 g_handler_stack_->push_back(this); | 248 g_handler_stack_->push_back(this); |
| 244 pthread_mutex_unlock(&g_handler_stack_mutex_); | 249 pthread_mutex_unlock(&g_handler_stack_mutex_); |
| 245 } | 250 } |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 descriptor.UpdatePath(); | 745 descriptor.UpdatePath(); |
| 741 if (!google_breakpad::WriteMinidump(descriptor.path(), | 746 if (!google_breakpad::WriteMinidump(descriptor.path(), |
| 742 child, | 747 child, |
| 743 child_blamed_thread)) | 748 child_blamed_thread)) |
| 744 return false; | 749 return false; |
| 745 | 750 |
| 746 return callback ? callback(descriptor, callback_context, true) : true; | 751 return callback ? callback(descriptor, callback_context, true) : true; |
| 747 } | 752 } |
| 748 | 753 |
| 749 } // namespace google_breakpad | 754 } // namespace google_breakpad |
| OLD | NEW |