diff options
author | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 17:21:57 +0000 |
---|---|---|
committer | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 17:21:57 +0000 |
commit | 476d44d8d8afacf574713c7403784a2b0c09dc8f (patch) | |
tree | cab274f1d03c7e5d0b13e5684202821ff0c09b1f /webkit | |
parent | 73216b28eb41641844b8d97388fce5f76edc6d67 (diff) | |
download | chromium_src-476d44d8d8afacf574713c7403784a2b0c09dc8f.zip chromium_src-476d44d8d8afacf574713c7403784a2b0c09dc8f.tar.gz chromium_src-476d44d8d8afacf574713c7403784a2b0c09dc8f.tar.bz2 |
Add NPP_SetWindow() with a NULL window to stop races in plugin
shutdown until a revised version of 372025 lands.
BUG=25694
TEST=Quicktime plugin should no longer crash when pages close
Review URL: http://codereview.chromium.org/383006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index 9e7c90e..077327c 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -201,6 +201,12 @@ void WebPluginDelegateImpl::DestroyInstance() { // this before calling set_web_plugin(NULL) because the // instance uses the helper to do the download. instance_->CloseStreams(); + + window_.window = NULL; + if (!(quirks_ & PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY)) { + instance_->NPP_SetWindow(&window_); + } + instance_->NPP_Destroy(); instance_->set_web_plugin(NULL); instance_ = 0; |