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

Unified Diff: chrome/browser/ui/hung_plugin_tab_helper.cc

Issue 10253016: Generate crash dumps when a hung PPAPI plugin is force terminated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/browser/hang_monitor/hung_window_detector.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/hung_plugin_tab_helper.cc
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.cc b/chrome/browser/ui/hung_plugin_tab_helper.cc
index 0b748dd8a0ca3e60535f8f827cf270a79a706b48..a16e4f7d4fdb77d4ad87dd93e8dbba7a83f53817 100644
--- a/chrome/browser/ui/hung_plugin_tab_helper.cc
+++ b/chrome/browser/ui/hung_plugin_tab_helper.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/process_util.h"
+#include "build/build_config.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
@@ -21,6 +22,10 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#if defined(OS_WIN)
+#include "chrome/browser/hang_monitor/hang_crash_dump_win.h"
+#endif
+
namespace {
// Delay in seconds before re-showing the hung plugin message. This will be
@@ -40,10 +45,11 @@ void KillPluginOnIOThread(int child_id) {
while (!iter.Done()) {
const content::ChildProcessData& data = iter.GetData();
if (data.id == child_id) {
- // TODO(brettw) bug 123021: it might be nice to do some stuff to capture
- // a stack. The NPAPI Windows hang monitor does some cool stuff in
- // hung_window_detector.cc.
+#if defined(OS_WIN)
+ CrashDumpAndTerminateHungChildProcess(data.handle);
+#else
base::KillProcess(data.handle, content::RESULT_CODE_HUNG, false);
+#endif
break;
}
++iter;
« no previous file with comments | « chrome/browser/hang_monitor/hung_window_detector.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698