[webkit-changes] [WebKit/WebKit] fc9024: Perform a respondsToSelector: check before calling...

Brady Eidson noreply at github.com
Tue Jun 25 17:01:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc90249d745382d553eb9efec91e5074095b548d
      https://github.com/WebKit/WebKit/commit/fc90249d745382d553eb9efec91e5074095b548d
  Author: Brady Eidson <beidson at apple.com>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm

  Log Message:
  -----------
  Perform a respondsToSelector: check before calling optional cookie delegate method
rdar://130405395
https://bugs.webkit.org/show_bug.cgi?id=275875

Reviewed by Per Arne Vollan.

The WKHTTPCookieStoreObserver method `cookiesDidChangeInCookieStore:` is optional,
but WebKit always calls it on registered observers.

Let's do a `respondsToSelectorCheck:` first, instead.

* Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST(WKHTTPCookieStore, ObserveCookiesReceivedFromHTTP)):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list