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

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

Issue 1267713003: Make the WebURLLoaderClients in the pepper code destroy (or have some guard) the loader in didFail() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed #7 and #8 Created 5 years, 4 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
Index: components/nacl/renderer/manifest_downloader.cc
diff --git a/components/nacl/renderer/manifest_downloader.cc b/components/nacl/renderer/manifest_downloader.cc
index 2ea1171cf691b78e70825f07d80bd4d2725e7e0c..c6eadc90b2a95e1df95c5eb5df333ddc89fe2f70 100644
--- a/components/nacl/renderer/manifest_downloader.cc
+++ b/components/nacl/renderer/manifest_downloader.cc
@@ -54,10 +54,7 @@ void ManifestDownloader::didReceiveData(
buffer_.append(data, data_length);
}
-void ManifestDownloader::didFinishLoading(
- blink::WebURLLoader* loader,
- double finish_time,
- int64_t total_encoded_data_length) {
+void ManifestDownloader::done() {
bbudge 2015/08/03 12:59:42 nit: Rename this to Close or something similar. Lo
tyoshino (SeeGerritForStatus) 2015/08/04 04:51:14 Oops! Fixed!
// We log the status code here instead of in didReceiveResponse so that we
// always log a histogram value, even when we never receive a status code.
HistogramHTTPStatusCode(
@@ -69,6 +66,13 @@ void ManifestDownloader::didFinishLoading(
delete this;
bbudge 2015/08/03 12:59:42 If you haven't changed the Blink ThreadableLoader
tyoshino (SeeGerritForStatus) 2015/08/04 04:51:14 Please see this comment. url_loader_ also gets del
}
+void ManifestDownloader::didFinishLoading(
+ blink::WebURLLoader* loader,
+ double finish_time,
+ int64_t total_encoded_data_length) {
+ done();
+}
+
void ManifestDownloader::didFail(
blink::WebURLLoader* loader,
const blink::WebURLError& error) {
@@ -85,6 +89,8 @@ void ManifestDownloader::didFail(
// It's a WebKit error.
pp_nacl_error_ = PP_NACL_ERROR_MANIFEST_NOACCESS_URL;
}
+
+ done();
}
} // namespace nacl

Powered by Google App Engine
This is Rietveld 408576698