summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 16:59:22 +0000
committerjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 16:59:22 +0000
commitb3f901e83c60041fa6fd822364bd3580a710e200 (patch)
tree84ce5890761b2ed90cdbb19f06935f4c1b4a51e1 /chrome/browser
parent68b18bbcefb9fcd5aed3f81a8957f15611bce542 (diff)
downloadchromium_src-b3f901e83c60041fa6fd822364bd3580a710e200.zip
chromium_src-b3f901e83c60041fa6fd822364bd3580a710e200.tar.gz
chromium_src-b3f901e83c60041fa6fd822364bd3580a710e200.tar.bz2
Check for hung plugin windows before detaching them
The process of detaching plugin windows from tab window involves windows messages across browser and plugin process. If the pungin process is hung this hangs the browser shutdown sequence. This workaround first checks if the plugin is responsive before detaching its window from the tab. If a plugin is hung, it's window would not be detached (and would be destroyed with the tab window). The side effect of not detaching is that some plugins expect their window to be valid until they get NPAPI shut down notifications and may crash if those notifications were sent after the window was destroyed. But since the plugin is hung anyway, we can go ahead not detaching the window. Plugin process will be cleaned up later. BUG=3613 Review URL: http://codereview.chromium.org/20301 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9756 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/tab_contents/web_contents_view_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/web_contents_view_win.cc b/chrome/browser/tab_contents/web_contents_view_win.cc
index 4e56727..9728ec8 100644
--- a/chrome/browser/tab_contents/web_contents_view_win.cc
+++ b/chrome/browser/tab_contents/web_contents_view_win.cc
@@ -33,7 +33,8 @@ namespace {
// Windows callback for OnDestroy to detach the plugin windows.
BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) {
- if (WebPluginDelegateImpl::IsPluginDelegateWindow(window)) {
+ if (WebPluginDelegateImpl::IsPluginDelegateWindow(window) &&
+ !IsHungAppWindow(window)) {
::ShowWindow(window, SW_HIDE);
SetParent(window, NULL);
}