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

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: Rebase 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
« no previous file with comments | « components/nacl/renderer/manifest_downloader.h ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a3721ff06bb08633d4453ae307f39c86f8207d96 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::Close() {
// 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;
}
+void ManifestDownloader::didFinishLoading(
+ blink::WebURLLoader* loader,
+ double finish_time,
+ int64_t total_encoded_data_length) {
+ Close();
+}
+
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;
}
+
+ Close();
}
} // namespace nacl
« no previous file with comments | « components/nacl/renderer/manifest_downloader.h ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698