summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 05:50:15 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 05:50:15 +0000
commitfc23ec8dd5f9359914ba6ab1b8bd00c494f547c9 (patch)
tree77f972963cda944d1ec123919d355efa35b858dc /chrome
parent9787fec1d6a14f3ca72288d277d3049c2c65b85e (diff)
downloadchromium_src-fc23ec8dd5f9359914ba6ab1b8bd00c494f547c9.zip
chromium_src-fc23ec8dd5f9359914ba6ab1b8bd00c494f547c9.tar.gz
chromium_src-fc23ec8dd5f9359914ba6ab1b8bd00c494f547c9.tar.bz2
Revert r21548 and r21559 due to crash spike.
Review URL: http://codereview.chromium.org/159383 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/plugin_messages_internal.h21
-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
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc6
5 files changed, 22 insertions, 18 deletions
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index 5138d5a..18152d9 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -183,19 +183,20 @@ IPC_BEGIN_MESSAGES(Plugin)
int /* id */,
GURL /* url */)
- IPC_MESSAGE_ROUTED1(PluginMsg_DidReceiveResponse,
- PluginMsg_DidReceiveResponseParams)
+ IPC_SYNC_MESSAGE_ROUTED1_1(PluginMsg_DidReceiveResponse,
+ PluginMsg_DidReceiveResponseParams,
+ bool /* cancel */)
- IPC_MESSAGE_ROUTED3(PluginMsg_DidReceiveData,
- int /* id */,
- std::vector<char> /* buffer */,
- int /* data_offset */)
+ IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_DidReceiveData,
+ int /* id */,
+ std::vector<char> /* buffer */,
+ int /* data_offset */)
- IPC_MESSAGE_ROUTED1(PluginMsg_DidFinishLoading,
- int /* id */)
+ IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_DidFinishLoading,
+ int /* id */)
- IPC_MESSAGE_ROUTED1(PluginMsg_DidFail,
- int /* id */)
+ IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_DidFail,
+ int /* id */)
IPC_MESSAGE_ROUTED5(PluginMsg_SendJavaScriptStream,
std::string /* url */,
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index 655a619..a8a42b0 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -173,7 +173,8 @@ void WebPluginDelegateStub::OnWillSendRequest(int id, const GURL& url) {
}
void WebPluginDelegateStub::OnDidReceiveResponse(
- const PluginMsg_DidReceiveResponseParams& params) {
+ const PluginMsg_DidReceiveResponseParams& params, bool* cancel) {
+ *cancel = false;
WebPluginResourceClient* client = webplugin_->GetResourceClient(params.id);
if (!client)
return;
@@ -182,7 +183,8 @@ void WebPluginDelegateStub::OnDidReceiveResponse(
params.headers,
params.expected_length,
params.last_modified,
- params.request_is_seekable);
+ params.request_is_seekable,
+ cancel);
}
void WebPluginDelegateStub::OnDidReceiveData(int id,
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index 519a648..2def46c 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -52,7 +52,8 @@ 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);
+ void OnDidReceiveResponse(const PluginMsg_DidReceiveResponseParams& params,
+ bool* cancel);
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 38cd306f..b98cc93 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -240,10 +240,8 @@ 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;
}
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 016c851..03b2b57 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -100,7 +100,8 @@ class ResourceClientProxy : public WebPluginResourceClient {
const std::string& headers,
uint32 expected_length,
uint32 last_modified,
- bool request_is_seekable) {
+ bool request_is_seekable,
+ bool* cancel) {
DCHECK(channel_ != NULL);
PluginMsg_DidReceiveResponseParams params;
params.id = resource_id_;
@@ -112,7 +113,8 @@ class ResourceClientProxy : public WebPluginResourceClient {
// Grab a reference on the underlying channel so it does not get
// deleted from under us.
scoped_refptr<PluginChannelHost> channel_ref(channel_);
- channel_->Send(new PluginMsg_DidReceiveResponse(instance_id_, params));
+ channel_->Send(new PluginMsg_DidReceiveResponse(instance_id_, params,
+ cancel));
}
void DidReceiveData(const char* buffer, int length, int data_offset) {