From eba8d4ec5ca3cf04ce20f7e9c1e2a6d355d35610 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Thu, 4 Feb 2010 14:32:02 -0600 Subject: [PATCH] Bug 543831 - [OOPP] Hang with embedded youtube video. r=bent. --- dom/plugins/PluginInstanceParent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom/plugins/PluginInstanceParent.cpp b/dom/plugins/PluginInstanceParent.cpp index bf18d7ce3f27..4f59f1edc08f 100644 --- a/dom/plugins/PluginInstanceParent.cpp +++ b/dom/plugins/PluginInstanceParent.cpp @@ -897,7 +897,11 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd, switch (message) { case WM_SETFOCUS: - self->CallSetPluginFocus(); + // Widget may be calling us back from AnswerPluginGotFocus(), make + // sure we don't end up sending this back over. If we're not in + // SendMessage, this is coming from the dom / focus manager. + if ((::InSendMessageEx(NULL) & ISMEX_SEND|ISMEX_REPLIED) != ISMEX_SEND) + self->CallSetPluginFocus(); break; case WM_CLOSE: