| Index: Source/core/fetch/ResourceFetcher.cpp
|
| diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
|
| index 16313d0bdac281cfdf92ea711bc31ee79d887a58..ea3ab1fb0d32814a6add28a02b237f4c90700101 100644
|
| --- a/Source/core/fetch/ResourceFetcher.cpp
|
| +++ b/Source/core/fetch/ResourceFetcher.cpp
|
| @@ -894,6 +894,10 @@ ResourceFetcher::RevalidationPolicy ResourceFetcher::determineRevalidationPolicy
|
|
|
| // 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;
|
| }
|
| @@ -929,6 +933,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;
|
| @@ -944,10 +952,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.
|
| //
|
|
|