summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 21:00:55 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 21:00:55 +0000
commit22fa6d5943c615df461c20b243e3299d872f865a (patch)
tree4ed115faa28dcf17998f1ce97a95e0abfc973df7 /webkit
parentb1cc8e3ff689c4dc05609a0054189ade3d4a6c0a (diff)
downloadchromium_src-22fa6d5943c615df461c20b243e3299d872f865a.zip
chromium_src-22fa6d5943c615df461c20b243e3299d872f865a.tar.gz
chromium_src-22fa6d5943c615df461c20b243e3299d872f865a.tar.bz2
Merge 32636 - 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 TBR=amanda@chromium.org Review URL: http://codereview.chromium.org/425001 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-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()) {