Title: [253847] trunk/Source/WebCore
Revision
253847
Author
cdu...@apple.com
Date
2019-12-20 14:59:44 -0800 (Fri, 20 Dec 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253846 => 253847)


--- trunk/Source/WebCore/ChangeLog	2019-12-20 22:52:27 UTC (rev 253846)
+++ trunk/Source/WebCore/ChangeLog	2019-12-20 22:59:44 UTC (rev 253847)
@@ -1,3 +1,24 @@
+2019-12-20  Chris Dumez  <cdu...@apple.com>
+
+        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):
+
 2019-12-20  Truitt Savell  <tsav...@apple.com>
 
         Unreviewed, rolling out r253820.

Modified: trunk/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp (253846 => 253847)


--- trunk/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp	2019-12-20 22:52:27 UTC (rev 253846)
+++ trunk/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp	2019-12-20 22:59:44 UTC (rev 253847)
@@ -121,7 +121,6 @@
 
     ResourceRequest request(parsedUrl);
     request.setHTTPMethod("POST"_s);
-    request.setPriority(ResourceLoadPriority::VeryLow);
 
     ResourceLoaderOptions options;
     options.credentials = FetchOptions::Credentials::Include;

Modified: trunk/Source/WebCore/loader/PingLoader.cpp (253846 => 253847)


--- trunk/Source/WebCore/loader/PingLoader.cpp	2019-12-20 22:52:27 UTC (rev 253846)
+++ trunk/Source/WebCore/loader/PingLoader.cpp	2019-12-20 22:59:44 UTC (rev 253847)
@@ -130,7 +130,6 @@
     request.setHTTPContentType("text/ping");
     request.setHTTPBody(FormData::create("PING"));
     request.setHTTPHeaderField(HTTPHeaderName::CacheControl, "max-age=0");
-    request.setPriority(ResourceLoadPriority::VeryLow);
 
     HTTPHeaderMap originalRequestHeader = request.httpHeaderFields();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to