From dc36e9c53d3760bbdc4253b786c4686f4cf7a3ea Mon Sep 17 00:00:00 2001 From: "mbelshe@google.com" Date: Thu, 31 Jul 2008 17:59:08 +0000 Subject: Turns out this fix works pretty well; the failures remaining after this fix are not related to throttled messages. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/webplugin_delegate_impl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc index 774cad7..d5b5413 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl.cc @@ -486,7 +486,11 @@ void WebPluginDelegateImpl::OnThrottleMessage() { const MSG& msg = *it; if (processed.find(msg.hwnd) == processed.end()) { WNDPROC proc = reinterpret_cast(msg.time); - CallWindowProc(proc, msg.hwnd, msg.message, msg.wParam, msg.lParam); + // It is possible that the window was closed after we queued + // this message. This is a rare event; just verify the window + // is alive. (see also bug 1259488) + if (IsWindow(msg.hwnd)) + CallWindowProc(proc, msg.hwnd, msg.message, msg.wParam, msg.lParam); processed[msg.hwnd] = 1; it = throttle_queue_.erase(it); windowless_queue.Decrement(); -- cgit v1.1