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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 59043006: Avoid reusing XMLHttpRequest resources during document load. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reduce scope of test to lessen timeout potential Created 7 years, 1 month 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 | « LayoutTests/http/tests/xmlhttprequest/sync-repeated-and-caching-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 651050f628e91525ac2c0356d49869f13ea22737..b20a6cc3d5c04ba8086851bf68ec3bc5027c0cc6 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -860,8 +860,9 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy
return Reload;
}
- // During the initial load, avoid loading the same resource multiple times for a single document, even if the cache policies would tell us to.
- if (document() && !document()->loadEventFinished() && m_validatedURLs.contains(existingResource->url()))
+ // During the initial load, avoid loading the same resource multiple times for a single document,
+ // even if the cache policies would tell us to. Raw resources are exempted.
+ if (type != Resource::Raw && document() && !document()->loadEventFinished() && m_validatedURLs.contains(existingResource->url()))
return Use;
// CachePolicyReload always reloads
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/sync-repeated-and-caching-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698