Chromium Code Reviews| 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 |