Changeset 253847 in webkit


Ignore:
Timestamp:
Dec 20, 2019 2:59:44 PM (4 years ago)
Author:
Chris Dumez
Message:

sendBeacon on Safari 13 seeing high failure rates
https://bugs.webkit.org/show_bug.cgi?id=204665
<rdar://problem/57522622>

Reviewed by Darin Adler.

Revert r245344 to try and reduce our failure rate for Beacon. This is the only change
to our Beacon implementation that I am aware we made in Safari 13. Using a lower priority
for Beacon makes it more likely that the Beacon load is still pending when the network
process exits, which would interrupt the Beacon.

Since we're trying to convince developers to move away from synchronous XHR and to using
the Beacon API intead, it is important that our Beacon API be as reliable as possible.

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):

  • loader/PingLoader.cpp:

(WebCore::PingLoader::sendPing):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r253844 r253847  
     12019-12-20  Chris Dumez  <cdumez@apple.com>
     2
     3        sendBeacon on Safari 13 seeing high failure rates
     4        https://bugs.webkit.org/show_bug.cgi?id=204665
     5        <rdar://problem/57522622>
     6
     7        Reviewed by Darin Adler.
     8
     9        Revert r245344 to try and reduce our failure rate for Beacon. This is the only change
     10        to our Beacon implementation that I am aware we made in Safari 13. Using a lower priority
     11        for Beacon makes it more likely that the Beacon load is still pending when the network
     12        process exits, which would interrupt the Beacon.
     13
     14        Since we're trying to convince developers to move away from synchronous XHR and to using
     15        the Beacon API intead, it is important that our Beacon API be as reliable as possible.
     16
     17        * Modules/beacon/NavigatorBeacon.cpp:
     18        (WebCore::NavigatorBeacon::sendBeacon):
     19        * loader/PingLoader.cpp:
     20        (WebCore::PingLoader::sendPing):
     21
    1222019-12-20  Truitt Savell  <tsavell@apple.com>
    223
  • trunk/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp

    r252349 r253847  
    122122    ResourceRequest request(parsedUrl);
    123123    request.setHTTPMethod("POST"_s);
    124     request.setPriority(ResourceLoadPriority::VeryLow);
    125124
    126125    ResourceLoaderOptions options;
  • trunk/Source/WebCore/loader/PingLoader.cpp

    r245344 r253847  
    131131    request.setHTTPBody(FormData::create("PING"));
    132132    request.setHTTPHeaderField(HTTPHeaderName::CacheControl, "max-age=0");
    133     request.setPriority(ResourceLoadPriority::VeryLow);
    134133
    135134    HTTPHeaderMap originalRequestHeader = request.httpHeaderFields();
Note: See TracChangeset for help on using the changeset viewer.