Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 26acda475c8a24f288048011d53aa52f74a84e32
      
https://github.com/WebKit/WebKit/commit/26acda475c8a24f288048011d53aa52f74a84e32
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M Source/WebCore/platform/network/DNS.h
    M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebCore/IPAddressTests.cpp

  Log Message:
  -----------
  Add helper methods to compare `WebCore::IPAddress`es
https://bugs.webkit.org/show_bug.cgi?id=248726
rdar://99360259

Reviewed by Tim Horton.

Add a helper method to compare two `WebCore::IPAddress`-es, and use it to 
implement some comparison
operators. Also, add an additions hook that allows us to adjust newly created 
`NSURLSession`s.

Test: IPAddressTests.CompareIPAddresses

* Source/WebCore/platform/network/DNS.h:
(WebCore::IPAddress::compare const):
(WebCore::IPAddress::operator< const):
(WebCore::IPAddress::operator> const):
(WebCore::IPAddress::operator== const):
(WebCore::IPAddress::operator!= const):

Add the `compare()` method, and use it to implement several binary comparison 
operators.

* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::applyAdditionalSettings):
(WebKit::createURLSession):

Factor out logic to create a new `NSURLSession` into a separate helper method, 
and call the
additions hook (`applyAdditionalSettings`) from within this new helper.

(WebKit::SessionWrapper::initialize):
(WebKit::NetworkSessionCocoa::clearCredentials):
* Tools/TestWebKitAPI/Tests/WebCore/IPAddressTests.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/257443@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to