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

Unified Diff: content/renderer/fetchers/web_url_loader_client_impl.cc

Issue 1089873003: Fix DCHECK failure when Manifest fetch has an Access Control error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/browser/manifest/manifest_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/fetchers/web_url_loader_client_impl.cc
diff --git a/content/renderer/fetchers/web_url_loader_client_impl.cc b/content/renderer/fetchers/web_url_loader_client_impl.cc
index 847a167928fd1c540763e7c569b3cae0543f095b..c78fa1b9e2e2d30ffa3aaca3fbd5a2619f4cce06 100644
--- a/content/renderer/fetchers/web_url_loader_client_impl.cc
+++ b/content/renderer/fetchers/web_url_loader_client_impl.cc
@@ -30,7 +30,10 @@ void WebURLLoaderClientImpl::didReceiveData(
const char* data,
int data_length,
int encoded_data_length) {
- DCHECK(!completed_);
+ // The AssociatedURLLoader will continue after a load failure.
+ // For example, for an Access Control error.
+ if (completed_)
+ return;
DCHECK(data_length > 0);
data_.append(data, data_length);
@@ -50,6 +53,10 @@ void WebURLLoaderClientImpl::didFinishLoading(
blink::WebURLLoader* loader,
double finishTime,
int64_t total_encoded_data_length) {
+ // The AssociatedURLLoader will continue after a load failure.
+ // For example, for an Access Control error.
+ if (completed_)
+ return;
OnLoadCompleteInternal(LOAD_SUCCEEDED);
}
« no previous file with comments | « content/browser/manifest/manifest_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698