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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp

Issue 2843013002: Revert of Don't lower priority for scripts inserted by doc.write (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
index 4b0b3eedc1edd2f186ab9ab995a08ccbd6dc5bbe..65e51ee7461176cb423bc41b692d864bb119a7b1 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -158,7 +158,7 @@
const ResourceRequest& resource_request,
ResourcePriority::VisibilityStatus visibility,
FetchParameters::DeferOption defer_option,
- FetchParameters::SpeculativePreloadType speculative_preload_type,
+ bool is_speculative_preload,
bool is_link_preload) {
ResourceLoadPriority priority = TypeToPriority(type);
@@ -189,9 +189,7 @@
// Preload late in document: Medium
if (FetchParameters::kLazyLoad == defer_option) {
priority = kResourceLoadPriorityLow;
- } else if (speculative_preload_type ==
- FetchParameters::SpeculativePreloadType::kInDocument &&
- image_fetched_) {
+ } else if (is_speculative_preload && image_fetched_) {
// Speculative preload is used as a signal for scripts at the bottom of
// the document.
priority = kResourceLoadPriorityMedium;
@@ -518,7 +516,7 @@
resource_request.SetPriority(ComputeLoadPriority(
factory.GetType(), params.GetResourceRequest(),
ResourcePriority::kNotVisible, params.Defer(),
- params.GetSpeculativePreloadType(), params.IsLinkPreload()));
+ params.IsSpeculativePreload(), params.IsLinkPreload()));
InitializeResourceRequest(resource_request, factory.GetType(),
params.Defer());
network_instrumentation::resourcePrioritySet(identifier,
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698