diff options
Diffstat (limited to 'webkit/glue/plugins/webplugin_delegate_impl.cc')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc index 7c7c47f..ab8dc17 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl.cc @@ -1002,7 +1002,18 @@ WebCursor::Type WebPluginDelegateImpl::GetCursorType( WebPluginResourceClient* WebPluginDelegateImpl::CreateResourceClient( int resource_id, const std::string &url, bool notify_needed, - void *notify_data) { + void *notify_data, void* existing_stream) { + // Stream already exists. This typically happens for range requests + // initiated via NPN_RequestRead. + if (existing_stream) { + NPAPI::PluginStream* plugin_stream = + reinterpret_cast<NPAPI::PluginStream*>(existing_stream); + + plugin_stream->CancelRequest(); + + return plugin_stream->AsResourceClient(); + } + if (notify_needed) { instance()->SetURLLoadData(GURL(url.c_str()), notify_data); } |