Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 722fe4fc50a4935023c450c325f8db75bdcc24a7
      
https://github.com/WebKit/WebKit/commit/722fe4fc50a4935023c450c325f8db75bdcc24a7
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-10-16 (Mon, 16 Oct 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h

  Log Message:
  -----------
  Fix build failures when importing WebKit, when `-DOS_OBJECT_USE_OBJC=0` is set
https://bugs.webkit.org/show_bug.cgi?id=263156
rdar://114438852

Reviewed by Richard Robinson.

Before iOS 17 / macOS Sonoma, it was possible to pull in WebKit headers 
(directly, or through Swift
modules) when compiling without ObjC-backed OS objects, by specifying 
`-DOS_OBJECT_USE_OBJC=0` as a
build setting. Some popular libraries and plugins such as the 
`flutter_inappwebview` plugin (see
also: <https://github.com/pichillilorenzo/flutter_inappwebview/issues/1735>) 
use this.

However, after we introduced the following public API in iOS 17:

```
@property (nullable, nonatomic, copy) NSArray<nw_proxy_config_t> 
*proxyConfigurations;
```

...this became impossible, since `nw_proxy_config_t` would be type-defined to 
an opaque struct
pointer in `Network.framework`, which is invalid as a type template argument in 
an `NSArray`. To fix
this, we adopt the same technique used in `Network/NSURLSession+Network.h` and 
simply expose a
generically-typed `NSArray` in the case where `OS_OBJECT_USE_OBJC` is off.

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to