Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1066)

Unified Diff: content/renderer/pepper/pepper_url_loader_host.cc

Issue 314603002: Ensure that in-process plugins can't destroy themselves by closing a URLLoader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_url_loader_host.cc
diff --git a/content/renderer/pepper/pepper_url_loader_host.cc b/content/renderer/pepper/pepper_url_loader_host.cc
index 27d427149eb1b45a38f3fefba1d4fec459ade0d5..4e505a9d5a12ba2674b13a4ba79e05a5d8ada308 100644
--- a/content/renderer/pepper/pepper_url_loader_host.cc
+++ b/content/renderer/pepper/pepper_url_loader_host.cc
@@ -361,8 +361,11 @@ void PepperURLLoaderHost::SendOrderedUpdateToPlugin(IPC::Message* message) {
void PepperURLLoaderHost::Close() {
if (loader_.get())
loader_->cancel();
- else if (main_document_loader_)
- GetFrame()->stopLoading();
+ else if (main_document_loader_) {
+ blink::WebFrame* frame = GetFrame();
+ if (frame)
+ frame->stopLoading();
+ }
}
blink::WebLocalFrame* PepperURLLoaderHost::GetFrame() {
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698