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

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

Issue 919893002: Replace handles that the handle closer closes with dummy Events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only change win Created 5 years, 10 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
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 ShutdownCrashReporter() {
620 if (g_breakpad) {
621 delete g_breakpad;
622 g_breakpad = NULL;
623 }
624 if (g_dumphandler_no_crash) {
625 delete g_dumphandler_no_crash;
626 g_dumphandler_no_crash = NULL;
627 }
628 }
629
619 // If the user has disabled crash reporting uploads and restarted Chrome, the 630 // If the user has disabled crash reporting uploads and restarted Chrome, the
620 // restarted instance will still contain the pipe environment variable, which 631 // restarted instance will still contain the pipe environment variable, which
621 // will allow the restarted process to still upload crash reports. This function 632 // will allow the restarted process to still upload crash reports. This function
622 // clears the environment variable, so that the restarted Chrome, which inherits 633 // clears the environment variable, so that the restarted Chrome, which inherits
623 // its environment from the current Chrome, will no longer contain the variable. 634 // its environment from the current Chrome, will no longer contain the variable.
624 extern "C" void __declspec(dllexport) __cdecl 635 extern "C" void __declspec(dllexport) __cdecl
625 ClearBreakpadPipeEnvironmentVariable() { 636 ClearBreakpadPipeEnvironmentVariable() {
626 scoped_ptr<base::Environment> env(base::Environment::Create()); 637 scoped_ptr<base::Environment> env(base::Environment::Create());
627 env->UnSetVar(kPipeNameVar); 638 env->UnSetVar(kPipeNameVar);
628 } 639 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 extern "C" void __declspec(dllexport) __cdecl 701 extern "C" void __declspec(dllexport) __cdecl
691 UnregisterNonABICompliantCodeRange(void* start) { 702 UnregisterNonABICompliantCodeRange(void* start) {
692 ExceptionHandlerRecord* record = 703 ExceptionHandlerRecord* record =
693 reinterpret_cast<ExceptionHandlerRecord*>(start); 704 reinterpret_cast<ExceptionHandlerRecord*>(start);
694 705
695 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 706 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
696 } 707 }
697 #endif 708 #endif
698 709
699 } // namespace breakpad 710 } // namespace breakpad
OLDNEW
« components/crash/app/breakpad_win.h ('K') | « components/crash/app/breakpad_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698