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

Unified Diff: components/nacl/renderer/file_downloader.cc

Issue 909233002: Pepper: Always call status_cb in FileDownloader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/file_downloader.cc
diff --git a/components/nacl/renderer/file_downloader.cc b/components/nacl/renderer/file_downloader.cc
index d6dd27063378f4b257215066747da1d023d9ca76..b2771f25db4e276a1d4f0b2c14a7fedee80e76db 100644
--- a/components/nacl/renderer/file_downloader.cc
+++ b/components/nacl/renderer/file_downloader.cc
@@ -93,6 +93,13 @@ void FileDownloader::didFail(
// It's a WebKit error.
status_ = ACCESS_DENIED;
}
+
+ // Delete url_loader to prevent didFinishLoading from being called, which
+ // some implementations of blink::WebURLLoader will do after calling didFail.
+ url_loader_.reset();
+
+ status_cb_.Run(status_, file_.Pass(), http_status_code_);
+ delete this;
}
} // namespace nacl
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698