summaryrefslogtreecommitdiffstats
path: root/chrome/browser/hang_monitor
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-30 22:53:56 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-30 22:53:56 +0000
commit9566d705ac052a5e70b3526379c9e6e84e2276c6 (patch)
tree593430f2d292a467ab42892a57c7e2a35f92eed6 /chrome/browser/hang_monitor
parent2bd527afea1c20a014ee95a87ca466d7e7b8b4b3 (diff)
downloadchromium_src-9566d705ac052a5e70b3526379c9e6e84e2276c6.zip
chromium_src-9566d705ac052a5e70b3526379c9e6e84e2276c6.tar.gz
chromium_src-9566d705ac052a5e70b3526379c9e6e84e2276c6.tar.bz2
Fix unresponsive browser due to a crashed plugin with a modal dialog.
If a plugin dies with an open modal window the browser window will not be enabled. So, we re-enable the browser if it's ever disabled without any child dialogs. BUG=90002 TEST=Kill the Flash process while a modal dialog (e.g. file, print) is open. Browser should remain responsive. Review URL: http://codereview.chromium.org/7812005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/hang_monitor')
-rw-r--r--chrome/browser/hang_monitor/hung_window_detector.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/hang_monitor/hung_window_detector.cc b/chrome/browser/hang_monitor/hung_window_detector.cc
index 035f270..e14ca62 100644
--- a/chrome/browser/hang_monitor/hung_window_detector.cc
+++ b/chrome/browser/hang_monitor/hung_window_detector.cc
@@ -59,6 +59,14 @@ void HungWindowDetector::OnTick() {
EnumChildWindows(top_level_window_, ChildWndEnumProc,
reinterpret_cast<LPARAM>(this));
+
+ // The window shouldn't be disabled unless we're showing a modal dialog.
+ // If we're not, then reenable the window.
+ if (!::IsWindowEnabled(top_level_window_) &&
+ !::GetWindow(top_level_window_, GW_ENABLEDPOPUP)) {
+ ::EnableWindow(top_level_window_, TRUE);
+ }
+
enumerating_ = false;
}