summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-04 23:28:02 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-04 23:28:02 +0000
commitf7d8a3a68aa3bca4b425863b50d4f9a2a350e7d9 (patch)
tree0088541a795dbb46b00a8544fba847574e3fbb7a /chrome/renderer
parent8bea74bd1b0acaaf7e8ebd57fecb93b586aa0855 (diff)
downloadchromium_src-f7d8a3a68aa3bca4b425863b50d4f9a2a350e7d9.zip
chromium_src-f7d8a3a68aa3bca4b425863b50d4f9a2a350e7d9.tar.gz
chromium_src-f7d8a3a68aa3bca4b425863b50d4f9a2a350e7d9.tar.bz2
Don't cancel the original manual data stream request when the plugin invokes
NPN_RequestRead to initiate seekable byte range requests on the stream. While the contract on the plugins part is not fully clear from the mozilla docs, this is what Firefox does. This also improves performance greatly as the manual data stream already has most of the data which the plugin requests anyway. I verified this with large PDF files around 14-15MB. We are twice as faster with this fix. This fixes http://code.google.com/p/chromium/issues/detail?id=5009, which is an issue with the PDF file not loading at times. The problem also occurs at times in Firefox when we set breakpoints and thus slow down the operation. The Reader plugin displays its UI in child windows on a separate thread in the plugin process. These are parented to the plugin window which lives on the plugin thread. The plugin thread unfortunately is treated as an IO thread by the plugin and it uses the SendMessage API to send messages to the plugin thread and back. If the plugin fails to receive data for the PDF file in a reasonable time, it just destroys the PDF window hierarchy causing this issue. Handing the data off the manual data stream along with the byte range data speeds up the whole operation and thus avoids this issue to a great extent. Bug=5009 R=jam Review URL: http://codereview.chromium.org/12960 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc5
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index c688817..e36f024 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -322,7 +322,6 @@ void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginHostMsg_URLRequest, OnHandleURLRequest)
IPC_MESSAGE_HANDLER(PluginHostMsg_GetCPBrowsingContext,
OnGetCPBrowsingContext)
- IPC_MESSAGE_HANDLER(PluginHostMsg_CancelDocumentLoad, OnCancelDocumentLoad)
IPC_MESSAGE_HANDLER(PluginHostMsg_InitiateHTTPRangeRequest,
OnInitiateHTTPRangeRequest)
IPC_MESSAGE_UNHANDLED_ERROR()
@@ -735,10 +734,6 @@ void WebPluginDelegateProxy::URLRequestRouted(const std::string& url,
notify_data));
}
-void WebPluginDelegateProxy::OnCancelDocumentLoad() {
- plugin_->CancelDocumentLoad();
-}
-
void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest(
const std::string& url, const std::string& range_info,
HANDLE existing_stream, bool notify_needed, HANDLE notify_data) {
diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index 392682c..b51d07c 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -124,7 +124,6 @@ class WebPluginDelegateProxy : public WebPluginDelegate,
std::string* json_retval);
void OnMissingPluginStatus(int status);
void OnGetCPBrowsingContext(uint32* context);
- void OnCancelDocumentLoad();
void OnInitiateHTTPRangeRequest(const std::string& url,
const std::string& range_info,
HANDLE existing_stream, bool notify_needed,