Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
index 9b449c347b97a45570c5fdd5c5f113afc134a2b6..260ed426f3ddf3246b71c747f3e3560056947609 100644 |
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp |
@@ -147,11 +147,13 @@ ResourceLoadPriority ResourceFetcher::computeLoadPriority(Resource::Type type, c |
if (type == Resource::Image) |
m_imageFetched = true; |
- // Special handling for scripts. |
- // Default/Parser-Blocking/Preload early in document: High (set in typeToPriority) |
- // Async/Defer: Low Priority (applies to both preload and parser-inserted) |
- // Preload late in document: Medium |
- if (type == Resource::Script) { |
+ if (FetchRequest::IdleLoad == request.defer()) { |
+ priority = ResourceLoadPriorityVeryLow; |
+ } else if (type == Resource::Script) { |
+ // Special handling for scripts. |
+ // Default/Parser-Blocking/Preload early in document: High (set in typeToPriority) |
+ // Async/Defer: Low Priority (applies to both preload and parser-inserted) |
+ // Preload late in document: Medium |
if (FetchRequest::LazyLoad == request.defer()) |
priority = ResourceLoadPriorityLow; |
else if (request.forPreload() && m_imageFetched) |