summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 18:05:27 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 18:05:27 +0000
commita0e4a8a69ee10f4ee7de10bb1f34efeab059a1d0 (patch)
treebf8f9ab81bdd584b778cc04ed01a88ec05c4ab67 /chrome/plugin
parenta327880c479b9ac5c5d742f9a9b15219ad260e3d (diff)
downloadchromium_src-a0e4a8a69ee10f4ee7de10bb1f34efeab059a1d0.zip
chromium_src-a0e4a8a69ee10f4ee7de10bb1f34efeab059a1d0.tar.gz
chromium_src-a0e4a8a69ee10f4ee7de10bb1f34efeab059a1d0.tar.bz2
The IPCs for carrying data requested by plugins have been changed from synchronous IPCs to asynchronous IPCs.
This fixes bug http://code.google.com/p/chromium/issues/detail?id=14323, where the Flash plugin would not render content on the page if these IPCs were processed while the plugin waited for sync calls like NPN_Evaluate to return. Test=covered by UI tests. Bug=14323 Review URL: http://codereview.chromium.org/159296 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc6
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h3
-rw-r--r--chrome/plugin/webplugin_proxy.cc4
3 files changed, 6 insertions, 7 deletions
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index a8a42b0..655a619 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -173,8 +173,7 @@ void WebPluginDelegateStub::OnWillSendRequest(int id, const GURL& url) {
}
void WebPluginDelegateStub::OnDidReceiveResponse(
- const PluginMsg_DidReceiveResponseParams& params, bool* cancel) {
- *cancel = false;
+ const PluginMsg_DidReceiveResponseParams& params) {
WebPluginResourceClient* client = webplugin_->GetResourceClient(params.id);
if (!client)
return;
@@ -183,8 +182,7 @@ void WebPluginDelegateStub::OnDidReceiveResponse(
params.headers,
params.expected_length,
params.last_modified,
- params.request_is_seekable,
- cancel);
+ params.request_is_seekable);
}
void WebPluginDelegateStub::OnDidReceiveData(int id,
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index 2def46c..519a648 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -52,8 +52,7 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
void OnInit(const PluginMsg_Init_Params& params, bool* result);
void OnWillSendRequest(int id, const GURL& url);
- void OnDidReceiveResponse(const PluginMsg_DidReceiveResponseParams& params,
- bool* cancel);
+ void OnDidReceiveResponse(const PluginMsg_DidReceiveResponseParams& params);
void OnDidReceiveData(int id, const std::vector<char>& buffer,
int data_offset);
void OnDidFinishLoading(int id);
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index 67919e8..3d34674 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -239,8 +239,10 @@ WebPluginProxy* WebPluginProxy::FromCPBrowsingContext(
WebPluginResourceClient* WebPluginProxy::GetResourceClient(int id) {
ResourceClientMap::iterator iterator = resource_clients_.find(id);
+ // The IPC messages which deal with streams are now asynchronous. It is
+ // now possible to receive stream messages from the renderer for streams
+ // which may have been cancelled by the plugin.
if (iterator == resource_clients_.end()) {
- NOTREACHED();
return NULL;
}