summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 18:52:16 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 18:52:16 +0000
commit28dbd6c136f605fc17dc308f058b95f7456553b0 (patch)
tree87278d812ad04f904f1510ac5b009daf194e3450 /webkit/glue
parent20ad269e71dc2a920bb2dc6a71591066aa4192cf (diff)
downloadchromium_src-28dbd6c136f605fc17dc308f058b95f7456553b0.zip
chromium_src-28dbd6c136f605fc17dc308f058b95f7456553b0.tar.gz
chromium_src-28dbd6c136f605fc17dc308f058b95f7456553b0.tar.bz2
Mac: avoid a race between UI and IO threads during plugin destruction.
BUG=24173,28190 TEST=Plugins should no longer crash in WebPluginDelegateImpl::OnNullEvent() Review URL: http://codereview.chromium.org/414044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 28daa29..706517e 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -779,6 +779,9 @@ void WebPluginDelegateImpl::OnNullEvent() {
delete this;
return;
}
+ // Avoid a race condition between IO and UI threads during plugin shutdown
+ if (!instance_)
+ return;
#ifndef NP_NO_CARBON
if (!webkit_glue::IsPluginRunningInRendererProcess()) {
switch (instance_->event_model()) {