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

Side by Side Diff: components/crash/app/breakpad_win.cc

Issue 944283002: Consume EXCEPTION_INVALID_HANDLE on sandbox process shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only eat exceptions on win10 Created 5 years, 9 months 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 | « components/crash/app/breakpad_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/crash/app/breakpad_win.h" 5 #include "components/crash/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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 #ifndef _WIN64 609 #ifndef _WIN64
610 if (process_type != L"browser" && 610 if (process_type != L"browser" &&
611 !GetCrashReporterClient()->IsRunningUnattended()) { 611 !GetCrashReporterClient()->IsRunningUnattended()) {
612 // Initialize the hook TerminateProcess to catch unexpected exits. 612 // Initialize the hook TerminateProcess to catch unexpected exits.
613 InitTerminateProcessHooks(); 613 InitTerminateProcessHooks();
614 } 614 }
615 #endif 615 #endif
616 } 616 }
617 } 617 }
618 618
619 void ConsumeInvalidHandleExceptions() {
620 if (g_breakpad) {
621 g_breakpad->set_consume_invalid_handle_exceptions(true);
622 }
623 if (g_dumphandler_no_crash) {
624 g_dumphandler_no_crash->set_consume_invalid_handle_exceptions(true);
625 }
626 }
627
619 // If the user has disabled crash reporting uploads and restarted Chrome, the 628 // If the user has disabled crash reporting uploads and restarted Chrome, the
620 // restarted instance will still contain the pipe environment variable, which 629 // restarted instance will still contain the pipe environment variable, which
621 // will allow the restarted process to still upload crash reports. This function 630 // will allow the restarted process to still upload crash reports. This function
622 // clears the environment variable, so that the restarted Chrome, which inherits 631 // clears the environment variable, so that the restarted Chrome, which inherits
623 // its environment from the current Chrome, will no longer contain the variable. 632 // its environment from the current Chrome, will no longer contain the variable.
624 extern "C" void __declspec(dllexport) __cdecl 633 extern "C" void __declspec(dllexport) __cdecl
625 ClearBreakpadPipeEnvironmentVariable() { 634 ClearBreakpadPipeEnvironmentVariable() {
626 scoped_ptr<base::Environment> env(base::Environment::Create()); 635 scoped_ptr<base::Environment> env(base::Environment::Create());
627 env->UnSetVar(kPipeNameVar); 636 env->UnSetVar(kPipeNameVar);
628 } 637 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 extern "C" void __declspec(dllexport) __cdecl 699 extern "C" void __declspec(dllexport) __cdecl
691 UnregisterNonABICompliantCodeRange(void* start) { 700 UnregisterNonABICompliantCodeRange(void* start) {
692 ExceptionHandlerRecord* record = 701 ExceptionHandlerRecord* record =
693 reinterpret_cast<ExceptionHandlerRecord*>(start); 702 reinterpret_cast<ExceptionHandlerRecord*>(start);
694 703
695 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 704 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
696 } 705 }
697 #endif 706 #endif
698 707
699 } // namespace breakpad 708 } // namespace breakpad
OLDNEW
« no previous file with comments | « components/crash/app/breakpad_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698