Chromium Code Reviews| Index: chrome/app/breakpad_win.cc |
| diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc |
| index d4f7eed7103a60aa8a368ecc485f0cbd9eca260f..2570cbefe03a2c1181d4e34566aef5f3c72b442e 100644 |
| --- a/chrome/app/breakpad_win.cc |
| +++ b/chrome/app/breakpad_win.cc |
| @@ -36,6 +36,7 @@ |
| #include "chrome/installer/util/google_update_settings.h" |
| #include "chrome/installer/util/install_util.h" |
| #include "policy/policy_constants.h" |
| +#include "ppapi/shared_impl/ppapi_message_tracker.h" |
| // userenv.dll is required for GetProfileType(). |
| #pragma comment(lib, "userenv.lib") |
| @@ -130,6 +131,20 @@ InjectDumpProcessWithoutCrash(HANDLE process) { |
| 0, 0, NULL); |
| } |
| +DWORD WINAPI DumpProcessHandlingPepper(void*) { |
|
brettw
2012/09/14 19:44:37
It would make more sense to me if this was called
yzshen1
2012/09/14 20:07:19
Done.
|
| + if (ppapi::PpapiMessageTracker::GetInstance()->IsHandlingMessage()) |
| + DumpProcessWithoutCrash(); |
| + return 0; |
| +} |
| + |
| +// Injects a thread into a remote process to dump state if the process is |
| +// handling pepper messages. |
| +extern "C" HANDLE __declspec(dllexport) __cdecl |
| +InjectDumpProcessHandlingPepper(HANDLE process) { |
| + return CreateRemoteThread(process, NULL, 0, DumpProcessHandlingPepper, 0, 0, |
| + NULL); |
| +} |
| + |
| // Reduces the size of the string |str| to a max of 64 chars. Required because |
| // breakpad's CustomInfoEntry raises an invalid_parameter error if the string |
| // we want to set is longer. |