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

Unified Diff: chrome/app/breakpad_win.cc

Issue 10909241: Generate dumps for relevant renderers when users kill a hung pepper plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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
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.

Powered by Google App Engine
This is Rietveld 408576698