diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 19:28:32 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 19:28:32 +0000 |
commit | 09cb52eeaeadcb21c196a884e4e2229f350a66a5 (patch) | |
tree | 59a7ab6f9b5e8a0c50db76487f8f1220f06be5d9 /webkit | |
parent | de1933bfeaa6bb2cbd4e022b5df44ca4c79ba87a (diff) | |
download | chromium_src-09cb52eeaeadcb21c196a884e4e2229f350a66a5.zip chromium_src-09cb52eeaeadcb21c196a884e4e2229f350a66a5.tar.gz chromium_src-09cb52eeaeadcb21c196a884e4e2229f350a66a5.tar.bz2 |
Check for a crashed plugin before creating resources to send to the plugin
BUG=95710
Review URL: http://codereview.chromium.org/7839040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/ppapi/ppapi_plugin_instance.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppapi_webplugin_impl.cc | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc index df52f19..de6c892 100644 --- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc @@ -450,6 +450,10 @@ bool PluginInstance::HandleDocumentLoad(PPB_URLLoader_Impl* loader) { bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event, WebCursorInfo* cursor_info) { + // Don't dispatch input events to crashed plugins. + if (module()->is_crashed()) + return false; + // Keep a reference on the stack. See NOTE above. scoped_refptr<PluginInstance> ref(this); diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc index cc6e66d..613f2d3 100644 --- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc +++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc @@ -10,6 +10,10 @@ #include "googleurl/src/gurl.h" #include "ppapi/c/pp_var.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" @@ -154,6 +158,12 @@ void WebPluginImpl::didReceiveResponse( const WebKit::WebURLResponse& response) { DCHECK(!document_loader_); + if (instance_->module()->is_crashed()) { + // Don't create a resource for a crashed plugin. + instance_->container()->element().document().frame()->stopLoading(); + return; + } + document_loader_ = new PPB_URLLoader_Impl(instance_->pp_instance(), true); document_loader_->didReceiveResponse(NULL, response); |