diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 11:57:04 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 11:57:04 +0000 |
commit | 8c0605c41b4836ff541ace6664c6d688ce476fad (patch) | |
tree | 6513e347ab62ee2a849cd12cba19a4807ffccbeb /webkit/glue | |
parent | 04913970d869894bb51e398dbf20ca0cb826a041 (diff) | |
download | chromium_src-8c0605c41b4836ff541ace6664c6d688ce476fad.zip chromium_src-8c0605c41b4836ff541ace6664c6d688ce476fad.tar.gz chromium_src-8c0605c41b4836ff541ace6664c6d688ce476fad.tar.bz2 |
Watch out for invalid delegate and container after destroying the WebViewPlugin.
BUG=49836
TEST=Enable FlashBlock, block all plugins and go to a site with a flash animation. No crashy!
Review URL: http://codereview.chromium.org/3020031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53932 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/webview_plugin.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/glue/plugins/webview_plugin.cc b/webkit/glue/plugins/webview_plugin.cc index 413ae10..1d50be6 100644 --- a/webkit/glue/plugins/webview_plugin.cc +++ b/webkit/glue/plugins/webview_plugin.cc @@ -55,6 +55,7 @@ bool WebViewPlugin::initialize(WebPluginContainer* container) { void WebViewPlugin::destroy() { delegate_->WillDestroyPlugin(); delegate_ = NULL; + container_ = NULL; MessageLoop::current()->DeleteSoon(FROM_HERE, this); } @@ -114,7 +115,7 @@ void WebViewPlugin::startDragging(const WebDragData&, void WebViewPlugin::didInvalidateRect(const WebRect& rect) { if (container_) - container_->invalidateRect(WebRect(rect)); + container_->invalidateRect(rect); } void WebViewPlugin::didChangeCursor(const WebCursorInfo& cursor) { @@ -122,7 +123,8 @@ void WebViewPlugin::didChangeCursor(const WebCursorInfo& cursor) { } void WebViewPlugin::didClearWindowObject(WebFrame* frame) { - delegate_->BindWebFrame(frame); + if (delegate_) + delegate_->BindWebFrame(frame); } bool WebViewPlugin::canHandleRequest(WebFrame* frame, |