summaryrefslogtreecommitdiffstats
path: root/content/renderer/fetchers
diff options
context:
space:
mode:
authormlamouri <mlamouri@chromium.org>2015-04-20 02:11:53 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-20 09:12:02 +0000
commitcd67622827724269db39c2ccb63d26e63bd41868 (patch)
tree6819dcb7871a699341acb0ae1e5d6149c7636858 /content/renderer/fetchers
parent82dbe21c1773668187614a17d832d84ae23ed54b (diff)
downloadchromium_src-cd67622827724269db39c2ccb63d26e63bd41868.zip
chromium_src-cd67622827724269db39c2ccb63d26e63bd41868.tar.gz
chromium_src-cd67622827724269db39c2ccb63d26e63bd41868.tar.bz2
Fix DCHECK failure when Manifest fetch has an Access Control error.
This is also updating the test that wasn't able to catch this error because of unfortunate timing issues. BUG=474228 Review URL: https://codereview.chromium.org/1089873003 Cr-Commit-Position: refs/heads/master@{#325810}
Diffstat (limited to 'content/renderer/fetchers')
-rw-r--r--content/renderer/fetchers/web_url_loader_client_impl.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/content/renderer/fetchers/web_url_loader_client_impl.cc b/content/renderer/fetchers/web_url_loader_client_impl.cc
index 847a167..c78fa1b 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);
}