summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 23:02:04 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 23:02:04 +0000
commit26865477e028ccee54a243467693e7cc25bf6783 (patch)
treefd95553207f2740d77b9c2129646cc198af4c046 /webkit/glue/webplugin_impl.cc
parent79d09750c0a1abab73836b80ddbe49c64a3e8ad9 (diff)
downloadchromium_src-26865477e028ccee54a243467693e7cc25bf6783.zip
chromium_src-26865477e028ccee54a243467693e7cc25bf6783.tar.gz
chromium_src-26865477e028ccee54a243467693e7cc25bf6783.tar.bz2
When the plugin crashes, cleanup references to its window in the renderer.
This avoids spurious messages when the plugin crashes, and potential issues (plugin crashes, the HWND/XID gets destroyed, a new one gets created by a new instance and gets the same HWND/XID, the browser operates on the new one instead of the old one). Review URL: http://codereview.chromium.org/160614 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index d7fee6d..0fe8fc2 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -413,6 +413,8 @@ void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) {
}
void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) {
+ DCHECK_EQ(window, window_);
+ window_ = NULL;
WebCore::Frame* frame = element_->document()->frame();
WebFrameImpl* webframe = WebFrameImpl::FromFrame(frame);
WebViewImpl* webview = webframe->GetWebViewImpl();