summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 19:00:29 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 19:00:29 +0000
commitd699e3a52d6431ea5d2a691f77866ac8ec7ba350 (patch)
treec79e502978d7b10f05afc2d0c3018491dc4c853d
parente57f3229d320c542bc24061bc7b041d6650659c4 (diff)
downloadchromium_src-d699e3a52d6431ea5d2a691f77866ac8ec7ba350.zip
chromium_src-d699e3a52d6431ea5d2a691f77866ac8ec7ba350.tar.gz
chromium_src-d699e3a52d6431ea5d2a691f77866ac8ec7ba350.tar.bz2
Checks if the plugin has gone away inside of HandleURLRequestInternal()
TEST=Set up a plugin to race a destroy call against the sync IPC, run 20 times BUG=27924 Review URL: http://codereview.chromium.org/391085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32193 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webplugin_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index bc23872..37f34c2 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -841,6 +841,12 @@ void WebPluginImpl::HandleURLRequestInternal(
return;
}
+ // CreateResourceClient() sends a synchronous IPC message so it's possible
+ // that TearDownPluginInstance() may have been called in the nested
+ // message loop. If so, don't start the request.
+ if (!delegate_)
+ return;
+
InitiateHTTPRequest(resource_id, resource_client, method, buf, len,
complete_url, NULL, use_plugin_src_as_referrer);
}