mac: Annotate proper availability for CTFontCopyVariationAxesInternal CTFontCopyVariationAxesInternal is CoreText-internal function that does not exist before macOS 12.1. Chrome doesn’t use it before macOS 13.0. This became a problem in Chrome 140 due to the new use of chained fixups (8da209e9fa12, https://chromium-review.googlesource.com/c/6729794, 2025-07-11), which were enabled in Chrome 140 as the first version that requires macOS 12, as chained fixups themselves require macOS 12. This is a load-time performance improvement, but it disables lazy-binding semantics. Even though Chrome didn’t use CTFontCopyVariationAxesInternal on macOS < 13, load-time binding means that all symbols must resolve at load time. This caused a launch failure on macOS 12.0 and 12.0.1. Annotating CTFontCopyVariationAxesInternal with an availability attribute that properly specifies that it’s only available on macOS ≥ 12.1 causes the symbol in linked output to be marked as weak, which should have been the case all along. It’s valid for a weak symbol to be missing at runtime, and dyld will resolve it to 0 (nullptr), even under bind-at-load with chained fixups. Since Chrome never attempts to call this function on macOS < 13, it will never be nullptr when used, so this is safe. Bug: 443764291 Change-Id: I7f1a99aea77415931e985384c05caeebde34ae1c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6927630 Commit-Queue: Mark Mentovai <mark@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: Mark Mentovai <mark@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1512777}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.