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

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

Issue 335463006: Ensure HandleDocumentLoad isn't called if the instance is destroyed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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..7b01400c2e698c984559b5fdeb3cae072bf20023 100644
--- a/content/renderer/pepper/pepper_url_loader_host.cc
+++ b/content/renderer/pepper/pepper_url_loader_host.cc
@@ -359,10 +359,18 @@ void PepperURLLoaderHost::SendOrderedUpdateToPlugin(IPC::Message* message) {
}
void PepperURLLoaderHost::Close() {
- if (loader_.get())
+ if (loader_.get()) {
loader_->cancel();
- else if (main_document_loader_)
- GetFrame()->stopLoading();
+ } else if (main_document_loader_) {
+ // TODO(raymes): Calling WebLocalFrame::stopLoading here is incorrect as it
+ // cancels all URL loaders associated with the frame. If a client has opened
+ // other URLLoaders and then closes the main one, the others should still
+ // remain connected. Work out how to only cancel the main request:
+ // crbug.com/384197.
+ blink::WebLocalFrame* 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