Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cocoa] [Shape Detection] WebKit crashes on launch when on the base system #13428

Conversation

litherum
Copy link
Contributor

@litherum litherum commented May 4, 2023

fcedcb7

[Cocoa] [Shape Detection] WebKit crashes on launch when on the base system
https://bugs.webkit.org/show_bug.cgi?id=256287
rdar://108870362

Reviewed by Aditya Keerthi.

Turns out the base system doesn't have Vision.framework or CoreML.framework. We were crashing
because we were statically linking with CoreML.framework. This patch makes us use soft linking
instead.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/ShapeDetection/Implementation/Cocoa/VisionUtilities.mm:
(WebCore::ShapeDetection::configureRequestToUseCPUOrGPU):
* Source/WebCore/PAL/pal/cocoa/CoreMLSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/CoreMLSoftLink.mm:
* Source/WebCore/PAL/pal/cocoa/VisionSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/VisionSoftLink.mm:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

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

d20224c

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
  πŸ›  πŸ§ͺ jsc βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ›  jsc-mips
βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-mips-tests

@litherum litherum self-assigned this May 4, 2023
@litherum litherum added the Canvas Bugs related to the canvas element. label May 4, 2023
@litherum litherum requested a review from whsieh May 4, 2023 01:02
@litherum
Copy link
Contributor Author

litherum commented May 4, 2023

I'll update the copyrights before landing.

@litherum litherum force-pushed the eng/Cocoa-Shape-Detection-WebKit-crashes-on-launch-when-on-the-base-system branch from 8685276 to 92e5526 Compare May 4, 2023 02:27
@litherum litherum force-pushed the eng/Cocoa-Shape-Detection-WebKit-crashes-on-launch-when-on-the-base-system branch from 92e5526 to d20224c Compare May 4, 2023 04:03
@litherum litherum added the merge-queue Applied to send a pull request to merge-queue label May 4, 2023
…ystem

https://bugs.webkit.org/show_bug.cgi?id=256287
rdar://108870362

Reviewed by Aditya Keerthi.

Turns out the base system doesn't have Vision.framework or CoreML.framework. We were crashing
because we were statically linking with CoreML.framework. This patch makes us use soft linking
instead.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/ShapeDetection/Implementation/Cocoa/VisionUtilities.mm:
(WebCore::ShapeDetection::configureRequestToUseCPUOrGPU):
* Source/WebCore/PAL/pal/cocoa/CoreMLSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/CoreMLSoftLink.mm:
* Source/WebCore/PAL/pal/cocoa/VisionSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/VisionSoftLink.mm:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/263661@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Cocoa-Shape-Detection-WebKit-crashes-on-launch-when-on-the-base-system branch from d20224c to fcedcb7 Compare May 4, 2023 05:11
@webkit-commit-queue
Copy link
Collaborator

Committed 263661@main (fcedcb7): https://commits.webkit.org/263661@main

Reviewed commits have been landed. Closing PR #13428 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit fcedcb7 into WebKit:main May 4, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 4, 2023
@litherum litherum deleted the eng/Cocoa-Shape-Detection-WebKit-crashes-on-launch-when-on-the-base-system branch May 4, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Canvas Bugs related to the canvas element.
Projects
None yet
4 participants