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

Unified Diff: components/crash/app/breakpad_win.cc

Issue 619543002: Hook up custom Win 64 SEH to v8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/v8_breakpad_support_win.cc ('k') | content/content_shell.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/app/breakpad_win.cc
diff --git a/components/crash/app/breakpad_win.cc b/components/crash/app/breakpad_win.cc
index b0dba9899e593ca3967444c2b5bf713293dc96d0..ebc6b1cddd0c8079752b18a9de8e2929a5711e73 100644
--- a/components/crash/app/breakpad_win.cc
+++ b/components/crash/app/breakpad_win.cc
@@ -611,4 +611,35 @@ extern "C" void __declspec(dllexport) __cdecl
env->UnSetVar(kPipeNameVar);
}
+#ifdef _WIN64
+PRUNTIME_FUNCTION GetRuntimeFunctionCallback(DWORD64 ControlPC, PVOID Context) {
+ if (g_breakpad) {
cpu_(ooo_6.6-7.5) 2014/09/30 19:20:49 why not call here CrashForException() ?
jochen (gone - plz use gerrit) 2014/09/30 19:23:26 i don't have exception pointers. I could create a
+ g_breakpad->WriteMinidump();
+ // Patched stub exists based on conditions (See InitCrashReporter).
+ // As a side note this function also gets called from
+ // WindowProcExceptionFilter.
+ if (g_real_terminate_process_stub == NULL) {
+ ::TerminateProcess(::GetCurrentProcess(), content::RESULT_CODE_KILLED);
+ } else {
+ NtTerminateProcessPtr real_terminate_proc =
+ reinterpret_cast<NtTerminateProcessPtr>(
+ static_cast<char*>(g_real_terminate_process_stub));
+ real_terminate_proc(::GetCurrentProcess(), content::RESULT_CODE_KILLED);
+ }
+ }
+ return NULL;
+}
+
+extern "C" void __declspec(dllexport) __cdecl
+RegisterNonABICompliantCodeRange(void* start, size_t size_in_bytes) {
+ RtlInstallFunctionTableCallback(
+ reinterpret_cast<DWORD64>(start) | 0x3,
cpu_(ooo_6.6-7.5) 2014/09/30 19:20:49 or 3 ? this needs a comment.
jochen (gone - plz use gerrit) 2014/09/30 19:23:26 well, because that's what the API says. First para
+ reinterpret_cast<DWORD64>(start),
+ static_cast<DWORD>(size_in_bytes),
+ GetRuntimeFunctionCallback,
+ NULL,
+ NULL);
+}
+#endif
+
} // namespace breakpad
« no previous file with comments | « chrome/common/v8_breakpad_support_win.cc ('k') | content/content_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698