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

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

Issue 317703005: Revert of Always preload all tokens before parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index ea3ab1fb0d32814a6add28a02b237f4c90700101..16313d0bdac281cfdf92ea711bc31ee79d887a58 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -894,10 +894,6 @@
// If the same URL has been loaded as a different type, we need to reload.
if (existingResource->type() != type) {
- // FIXME: If existingResource is a Preload and the new type is LinkPrefetch
- // We really should discard the new prefetch since the preload has more
- // specific type information! crbug.com/379893
- // fast/dom/HTMLLinkElement/link-and-subresource-test hits this case.
WTF_LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloading due to type mismatch.");
return Reload;
}
@@ -933,10 +929,6 @@
if (m_allowStaleResources)
return Use;
- // If fetching a resource with a different 'CORS enabled' flag, reload.
- if (type != Resource::MainResource && options.corsEnabled != existingResource->options().corsEnabled)
- return Reload;
-
// Always use preloads.
if (existingResource->isPreloaded())
return Use;
@@ -951,6 +943,10 @@
WTF_LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloading due to Cache-control: no-store.");
return Reload;
}
+
+ // If fetching a resource with a different 'CORS enabled' flag, reload.
+ if (type != Resource::MainResource && options.corsEnabled != existingResource->options().corsEnabled)
+ return Reload;
// If credentials were sent with the previous request and won't be
// with this one, or vice versa, re-fetch the resource.

Powered by Google App Engine
This is Rietveld 408576698