OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/breakpad/app/breakpad_win.h" | 5 #include "components/breakpad/app/breakpad_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <tchar.h> | 9 #include <tchar.h> |
10 #include <userenv.h> | 10 #include <userenv.h> |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 g_dumphandler_no_crash = new google_breakpad::ExceptionHandler(temp_dir, | 566 g_dumphandler_no_crash = new google_breakpad::ExceptionHandler(temp_dir, |
567 &FilterCallbackWhenNoCrash, | 567 &FilterCallbackWhenNoCrash, |
568 &DumpDoneCallbackWhenNoCrash, | 568 &DumpDoneCallbackWhenNoCrash, |
569 NULL, | 569 NULL, |
570 // Set the handler to none so this handler would not be added to | 570 // Set the handler to none so this handler would not be added to |
571 // |handler_stack_| in |ExceptionHandler| which is a list of exception | 571 // |handler_stack_| in |ExceptionHandler| which is a list of exception |
572 // handlers. | 572 // handlers. |
573 google_breakpad::ExceptionHandler::HANDLER_NONE, | 573 google_breakpad::ExceptionHandler::HANDLER_NONE, |
574 dump_type, pipe_name.c_str(), custom_info); | 574 dump_type, pipe_name.c_str(), custom_info); |
575 | 575 |
576 base::debug::SetDumpWithoutCrashingFunction(&DumpProcessWithoutCrash); | 576 // TODO(rtenneti): http://crbug.com/391165. Undo this change after getting |
| 577 // data. Disabled DumpProcessWithoutCrash to see if UMA crash rate decreases. |
| 578 // base::debug::SetDumpWithoutCrashingFunction(&DumpProcessWithoutCrash); |
577 | 579 |
578 if (g_breakpad->IsOutOfProcess()) { | 580 if (g_breakpad->IsOutOfProcess()) { |
579 // Tells breakpad to handle breakpoint and single step exceptions. | 581 // Tells breakpad to handle breakpoint and single step exceptions. |
580 // This might break JIT debuggers, but at least it will always | 582 // This might break JIT debuggers, but at least it will always |
581 // generate a crashdump for these exceptions. | 583 // generate a crashdump for these exceptions. |
582 g_breakpad->set_handle_debug_exceptions(true); | 584 g_breakpad->set_handle_debug_exceptions(true); |
583 | 585 |
584 #ifndef _WIN64 | 586 #ifndef _WIN64 |
585 if (process_type != L"browser" && | 587 if (process_type != L"browser" && |
586 !GetBreakpadClient()->IsRunningUnattended()) { | 588 !GetBreakpadClient()->IsRunningUnattended()) { |
587 // Initialize the hook TerminateProcess to catch unexpected exits. | 589 // Initialize the hook TerminateProcess to catch unexpected exits. |
588 InitTerminateProcessHooks(); | 590 InitTerminateProcessHooks(); |
589 } | 591 } |
590 #endif | 592 #endif |
591 } | 593 } |
592 } | 594 } |
593 | 595 |
594 } // namespace breakpad | 596 } // namespace breakpad |
OLD | NEW |