From d699e3a52d6431ea5d2a691f77866ac8ec7ba350 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" Date: Tue, 17 Nov 2009 19:00:29 +0000 Subject: 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 --- webkit/glue/webplugin_impl.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- cgit v1.1