Title: [290338] trunk/Source/WebKit
Revision
290338
Author
[email protected]
Date
2022-02-22 16:27:00 -0800 (Tue, 22 Feb 2022)

Log Message

PingLoader is failing to call completion handler in error case
https://bugs.webkit.org/show_bug.cgi?id=237062
<rdar://50157253>

Reviewed by Chris Dumez.

The completion handler was not being called in the case of a PingLoad being redirected to
a non-HTTP(S) scheme.

* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::willPerformHTTPRedirection):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (290337 => 290338)


--- trunk/Source/WebKit/ChangeLog	2022-02-23 00:13:01 UTC (rev 290337)
+++ trunk/Source/WebKit/ChangeLog	2022-02-23 00:27:00 UTC (rev 290338)
@@ -1,3 +1,17 @@
+2022-02-22  Brent Fulgham  <[email protected]>
+
+        PingLoader is failing to call completion handler in error case
+        https://bugs.webkit.org/show_bug.cgi?id=237062
+        <rdar://50157253>
+
+        Reviewed by Chris Dumez.
+
+        The completion handler was not being called in the case of a PingLoad being redirected to
+        a non-HTTP(S) scheme.
+
+        * NetworkProcess/PingLoad.cpp:
+        (WebKit::PingLoad::willPerformHTTPRedirection):
+
 2022-02-22  Fujii Hironori  <[email protected]>
 
         [WinCairo][WK2] animations/background-position.html is timing out

Modified: trunk/Source/WebKit/NetworkProcess/PingLoad.cpp (290337 => 290338)


--- trunk/Source/WebKit/NetworkProcess/PingLoad.cpp	2022-02-23 00:13:01 UTC (rev 290337)
+++ trunk/Source/WebKit/NetworkProcess/PingLoad.cpp	2022-02-23 00:27:00 UTC (rev 290338)
@@ -134,13 +134,14 @@
 {
     m_networkLoadChecker->checkRedirection(ResourceRequest { }, WTFMove(request), WTFMove(redirectResponse), nullptr, [this, completionHandler = WTFMove(completionHandler)] (auto&& result) mutable {
         if (!result.has_value()) {
+            this->didFinish(result.error());
             completionHandler({ });
-            this->didFinish(result.error());
             return;
         }
         auto request = WTFMove(result->redirectRequest);
         if (!request.url().protocolIsInHTTPFamily()) {
             this->didFinish(ResourceError { String { }, 0, request.url(), "Redirection to URL with a scheme that is not HTTP(S)"_s, ResourceError::Type::AccessControl });
+            completionHandler({ });
             return;
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to