[webkit-changes] [WebKit/WebKit] dd7dff: [Cocoa] _WKFeature instances fail bincompat isKind...

Elliott Williams noreply at github.com
Mon Jan 23 14:32:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd7dffb5b05602e62d281bfb91d240bd166fcfb2
      https://github.com/WebKit/WebKit/commit/dd7dffb5b05602e62d281bfb91d240bd166fcfb2
  Author: Elliott Williams <emw at apple.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/_WKFeature.mm

  Log Message:
  -----------
  [Cocoa] _WKFeature instances fail bincompat isKindOfClass: check
https://bugs.webkit.org/show_bug.cgi?id=251028
rdar://104543339

Reviewed by Patrick Angle.

As part of the feature status rollout, we replaced the
_WKExperimentalFeature / _WKInternalDebugFeature class dichotomy with a
single _WKFeature base class. For bincompat, our legacy endpoints lie
about their instance type and declare e.g. an NSArray<_WKExperimentalFeature *>,
when the actual instance types are _WKFeature.

This matches existing behavior but causes feature instances to fail a
isKindOfClass:[_WKExperimentalFeature class] check.

Prevent this by overriding isKindOfClass. It's unsavory, but can be
removed when we deprecate and then remove the legacy subclasses.

* Source/WebKit/UIProcess/API/Cocoa/_WKFeature.mm:
(-[_WKFeature isKindOfClass:]):

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




More information about the webkit-changes mailing list