Index: Source/core/fetch/ResourceFetcher.cpp |
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp |
index 8dc7481614f72fc59d67c9b5b728a3da3b345943..832c4bf4ab2a66a9cdb878028e48233f10bae498 100644 |
--- a/Source/core/fetch/ResourceFetcher.cpp |
+++ b/Source/core/fetch/ResourceFetcher.cpp |
@@ -923,6 +923,10 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy |
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; |
@@ -938,10 +942,6 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy |
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. |
// |