Changeset 251954 in webkit


Ignore:
Timestamp:
Nov 1, 2019 4:55:12 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Mark VeryLow priority requests using a request dictionary key
https://bugs.webkit.org/show_bug.cgi?id=203594

Patch by Benjamin Nham <Ben Nham> on 2019-11-01
Reviewed by Alex Christensen.

Mark very-low-pri beacon/ping loads using a request dictionary key. PLT currently ignores
these loads by checking if a request's CFURLRequestPriority is 0, but that won't work
anymore once I make VeryLow and Low pri requests both have a priority of 0 for
https://bugs.webkit.org/show_bug.cgi?id=203423.

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::ResourceRequest::doUpdatePlatformRequest):

  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdatePlatformRequest):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r251953 r251954  
     12019-11-01  Benjamin Nham  <nham@apple.com>
     2
     3        Mark VeryLow priority requests using a request dictionary key
     4        https://bugs.webkit.org/show_bug.cgi?id=203594
     5
     6        Reviewed by Alex Christensen.
     7
     8        Mark very-low-pri beacon/ping loads using a request dictionary key. PLT currently ignores
     9        these loads by checking if a request's CFURLRequestPriority is 0, but that won't work
     10        anymore once I make VeryLow and Low pri requests both have a priority of 0 for
     11        https://bugs.webkit.org/show_bug.cgi?id=203423.
     12
     13        * platform/network/cf/ResourceRequestCFNet.cpp:
     14        (WebCore::ResourceRequest::doUpdatePlatformRequest):
     15        * platform/network/cocoa/ResourceRequestCocoa.mm:
     16        (WebCore::ResourceRequest::doUpdatePlatformRequest):
     17
    1182019-11-01  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp

    r250142 r251954  
    194194        CFURLRequestSetShouldPipelineHTTP(cfRequest, true, true);
    195195
    196     if (resourcePrioritiesEnabled())
     196    if (resourcePrioritiesEnabled()) {
    197197        CFURLRequestSetRequestPriority(cfRequest, toPlatformRequestPriority(priority()));
     198
     199        // Used by PLT to ignore very low priority beacon and ping loads.
     200        if (priority() == ResourceLoadPriority::VeryLow)
     201            _CFURLRequestSetProtocolProperty(cfRequest, CFSTR("WKVeryLowLoadPriority"), kCFBooleanTrue);
     202    }
    198203
    199204    setHeaderFields(cfRequest, httpHeaderFields());
  • trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm

    r250142 r251954  
    170170        CFURLRequestSetShouldPipelineHTTP([nsRequest _CFURLRequest], true, true);
    171171
    172     if (ResourceRequest::resourcePrioritiesEnabled())
     172    if (ResourceRequest::resourcePrioritiesEnabled()) {
    173173        CFURLRequestSetRequestPriority([nsRequest _CFURLRequest], toPlatformRequestPriority(priority()));
     174
     175        // Used by PLT to ignore very low priority beacon and ping loads.
     176        if (priority() == ResourceLoadPriority::VeryLow)
     177            _CFURLRequestSetProtocolProperty([nsRequest _CFURLRequest], CFSTR("WKVeryLowLoadPriority"), kCFBooleanTrue);
     178    }
    174179
    175180    [nsRequest setCachePolicy:toPlatformRequestCachePolicy(cachePolicy())];
Note: See TracChangeset for help on using the changeset viewer.