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

Side by Side Diff: components/crash/content/app/crashpad_win.cc

Issue 1512463003: win: Get Kasko crash keys from Crashpad instead of Breakpad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/content/app/crashpad.cc ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/content/app/crashpad.h" 5 #include "components/crash/content/app/crashpad.h"
6 6
7 #include "base/debug/crash_logging.h"
7 #include "base/environment.h" 8 #include "base/environment.h"
8 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "base/numerics/safe_conversions.h" 11 #include "base/numerics/safe_conversions.h"
11 #include "base/path_service.h" 12 #include "base/path_service.h"
12 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "components/crash/content/app/crash_reporter_client.h" 17 #include "components/crash/content/app/crash_reporter_client.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // for it to do anything. 107 // for it to do anything.
107 // NOTE: This function is used by SyzyASAN to invoke a crash. If you change the 108 // NOTE: This function is used by SyzyASAN to invoke a crash. If you change the
108 // the name or signature of this function you will break SyzyASAN instrumented 109 // the name or signature of this function you will break SyzyASAN instrumented
109 // releases of Chrome. Please contact syzygy-team@chromium.org before doing so! 110 // releases of Chrome. Please contact syzygy-team@chromium.org before doing so!
110 int __declspec(dllexport) CrashForException( 111 int __declspec(dllexport) CrashForException(
111 EXCEPTION_POINTERS* info) { 112 EXCEPTION_POINTERS* info) {
112 g_crashpad_client.Get().DumpAndCrash(info); 113 g_crashpad_client.Get().DumpAndCrash(info);
113 return EXCEPTION_CONTINUE_SEARCH; 114 return EXCEPTION_CONTINUE_SEARCH;
114 } 115 }
115 116
117 // NOTE: This function is used by SyzyASAN to annotate crash reports. If you
118 // change the name or signature of this function you will break SyzyASAN
119 // instrumented releases of Chrome. Please contact syzygy-team@chromium.org
120 // before doing so! See also http://crbug.com/567781.
121 void __declspec(dllexport) __cdecl SetCrashKeyValueImpl(
scottmg 2015/12/08 20:51:52 From breakpad_win.cc.
122 const wchar_t* key, const wchar_t* value) {
123 base::debug::SetCrashKeyValue(base::UTF16ToUTF8(key),
124 base::UTF16ToUTF8(value));
125 }
126
127 void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(
128 const wchar_t* key) {
129 base::debug::ClearCrashKey(base::UTF16ToUTF8(key));
130 }
131
116 // TODO(scottmg): http://crbug.com/546288 These exported functions are for 132 // TODO(scottmg): http://crbug.com/546288 These exported functions are for
117 // compatibility with how Breakpad worked, but it seems like there's no need to 133 // compatibility with how Breakpad worked, but it seems like there's no need to
118 // do the CreateRemoteThread() dance with a minor extension of the Crashpad API 134 // do the CreateRemoteThread() dance with a minor extension of the Crashpad API
119 // (to just pass the pid we want a dump for). We should add that and then modify 135 // (to just pass the pid we want a dump for). We should add that and then modify
120 // hang_crash_dump_win.cc to work in a more direct manner. 136 // hang_crash_dump_win.cc to work in a more direct manner.
121 137
122 // Used for dumping a process state when there is no crash. 138 // Used for dumping a process state when there is no crash.
123 extern "C" void __declspec(dllexport) __cdecl DumpProcessWithoutCrash() { 139 extern "C" void __declspec(dllexport) __cdecl DumpProcessWithoutCrash() {
124 CRASHPAD_SIMULATE_CRASH(); 140 CRASHPAD_SIMULATE_CRASH();
125 } 141 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 reinterpret_cast<ExceptionHandlerRecord*>(start); 263 reinterpret_cast<ExceptionHandlerRecord*>(start);
248 264
249 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 265 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
250 } 266 }
251 #endif // ARCH_CPU_X86_64 267 #endif // ARCH_CPU_X86_64
252 268
253 } // extern "C" 269 } // extern "C"
254 270
255 } // namespace internal 271 } // namespace internal
256 } // namespace crash_reporter 272 } // namespace crash_reporter
OLDNEW
« no previous file with comments | « components/crash/content/app/crashpad.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698