OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/crash_handler_host_linux.h" | 5 #include "chrome/browser/crash_handler_host_linux.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
10 #include <sys/syscall.h> | 10 #include <sys/syscall.h> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 ExceptionHandler::CrashContext* bad_context = | 317 ExceptionHandler::CrashContext* bad_context = |
318 reinterpret_cast<ExceptionHandler::CrashContext*>(crash_context); | 318 reinterpret_cast<ExceptionHandler::CrashContext*>(crash_context); |
319 bad_context->tid = crashing_tid; | 319 bad_context->tid = crashing_tid; |
320 | 320 |
321 // Sanitize the string data a bit more | 321 // Sanitize the string data a bit more |
322 guid[kGuidSize] = crash_url[kMaxActiveURLSize] = distro[kDistroSize] = 0; | 322 guid[kGuidSize] = crash_url[kMaxActiveURLSize] = distro[kDistroSize] = 0; |
323 | 323 |
324 // Freed in CrashDumpTask(); | 324 // Freed in CrashDumpTask(); |
325 BreakpadInfo* info = new BreakpadInfo; | 325 BreakpadInfo* info = new BreakpadInfo; |
326 | 326 |
| 327 info->fd = -1; |
327 info->process_type_length = process_type_.length(); | 328 info->process_type_length = process_type_.length(); |
328 char* process_type_str = new char[info->process_type_length + 1]; | 329 char* process_type_str = new char[info->process_type_length + 1]; |
329 process_type_.copy(process_type_str, info->process_type_length); | 330 process_type_.copy(process_type_str, info->process_type_length); |
330 process_type_str[info->process_type_length] = '\0'; | 331 process_type_str[info->process_type_length] = '\0'; |
331 info->process_type = process_type_str; | 332 info->process_type = process_type_str; |
332 | 333 |
333 info->crash_url_length = strlen(crash_url); | 334 info->crash_url_length = strlen(crash_url); |
334 info->crash_url = crash_url; | 335 info->crash_url = crash_url; |
335 | 336 |
336 info->guid_length = strlen(guid); | 337 info->guid_length = strlen(guid); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 } | 527 } |
527 | 528 |
528 void RendererCrashHandlerHostLinux::SetProcessType() { | 529 void RendererCrashHandlerHostLinux::SetProcessType() { |
529 process_type_ = "renderer"; | 530 process_type_ = "renderer"; |
530 } | 531 } |
531 | 532 |
532 // static | 533 // static |
533 RendererCrashHandlerHostLinux* RendererCrashHandlerHostLinux::GetInstance() { | 534 RendererCrashHandlerHostLinux* RendererCrashHandlerHostLinux::GetInstance() { |
534 return Singleton<RendererCrashHandlerHostLinux>::get(); | 535 return Singleton<RendererCrashHandlerHostLinux>::get(); |
535 } | 536 } |
OLD | NEW |