Bug 541362 - [OOPP] hang closing tab with Yahoo web messenger loaded. r=bent.

--HG--
extra : rebase_source : 007df4403cc58cb02579723991827795e031f6bd
This commit is contained in:
Jim Mathies 2010-01-26 15:40:43 -06:00
parent 757c1b3d63
commit 877cceccfa

View File

@ -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);