[webkit-changes] [WebKit/WebKit] 159993: Catalyst build fix: Rename WebCore WKRetain/WKRele...

Elliott Williams noreply at github.com
Fri Jun 16 13:50:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 159993b6159767023613bcc8705a0ae0848b7872
      https://github.com/WebKit/WebKit/commit/159993b6159767023613bcc8705a0ae0848b7872
  Author: Elliott Williams <emw at apple.com>
  Date:   2023-06-16 (Fri, 16 Jun 2023)

  Changed paths:
    M Source/WebCore/platform/ios/wak/WAKClipView.m
    M Source/WebCore/platform/ios/wak/WAKScrollView.mm
    M Source/WebCore/platform/ios/wak/WAKView.mm
    M Source/WebCore/platform/ios/wak/WKUtilities.c
    M Source/WebCore/platform/ios/wak/WKUtilities.h

  Log Message:
  -----------
  Catalyst build fix: Rename WebCore WKRetain/WKRelease to avoid overshadowing WebKit
https://bugs.webkit.org/show_bug.cgi?id=257560
rdar://103361403

Reviewed by Alexey Proskuryakov.

In the Mac Catalyst build:

- WebCore implements WKRetain/WKRelease as part of the WAK library. The
  symbols are hidden (but present in the debug build's symbol table).

- WebKit implements its own WKRetain/WKRelease, which is exported. It
  also reexports WebCore, which it only does on macOS.

- During the InstallAPI verification phase, TAPI ignores any symbols
  from headers that are implemented from a reexported framework. This
  means that even though it parses WebKit's WKRetain/WKRelease
  declarations, it refuses to use them, failing with

    error: no declaration found for exported symbol '_WKRelease' in dynamic library
    error: no declaration found for exported symbol '_WKRetain' in dynamic library

This doesn't happen in production builds, because they stubify WebCore
before WebKit begins building, so TAPI only reads re-exported symbols
from WebCore.tbd.

Since WebCore's WKRetain/WKRelease are hidden, just rename them.

* Source/WebCore/platform/ios/wak/WAKClipView.m:
(-[WAKClipView initWithFrame:]):
* Source/WebCore/platform/ios/wak/WAKScrollView.mm:
(-[WAKScrollView initWithFrame:]):
* Source/WebCore/platform/ios/wak/WAKView.mm:
(-[WAKView _initWithViewRef:]):
(-[WAKView initWithFrame:]):
(-[WAKView dealloc]):
* Source/WebCore/platform/ios/wak/WKUtilities.c:
(WAKRetain):
(WKCollectionRelease):
(WAKRelease):
(WKRetain): Deleted.
(WKRelease): Deleted.
* Source/WebCore/platform/ios/wak/WKUtilities.h:

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




More information about the webkit-changes mailing list