From 877cceccfadba8827451d1fe546daca85c9cbf1d Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Tue, 26 Jan 2010 15:40:43 -0600 Subject: [PATCH] Bug 541362 - [OOPP] hang closing tab with Yahoo web messenger loaded. r=bent. --HG-- extra : rebase_source : 007df4403cc58cb02579723991827795e031f6bd --- dom/plugins/PluginInstanceChild.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dom/plugins/PluginInstanceChild.cpp b/dom/plugins/PluginInstanceChild.cpp index 72c24a961d9..36408235799 100644 --- a/dom/plugins/PluginInstanceChild.cpp +++ b/dom/plugins/PluginInstanceChild.cpp @@ -688,6 +688,14 @@ PluginInstanceChild::PluginWindowProc(HWND hWnd, if (message == WM_MOUSEACTIVATE) self->CallPluginGotFocus(); + // Prevent lockups due to plugins making rpc calls when the parent + // is making a synchronous SetFocus api call. (bug 541362) Add more + // windowing events as needed for other api. + if (message == WM_KILLFOCUS && + ((InSendMessageEx(NULL) & (ISMEX_REPLIED|ISMEX_SEND)) == ISMEX_SEND)) { + ReplyMessage(0); // Unblock the caller + } + LRESULT res = CallWindowProc(self->mPluginWndProc, hWnd, message, wParam, lParam);