[webkit-changes] [WebKit/WebKit] 8b8402: [UnifiedPDF] [iPadOS] Web content process crashes ...
Abrar Rahman Protyasha
noreply at github.com
Fri Dec 6 16:06:04 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8b8402597982b6c33a4e676d79466865b68351d7
https://github.com/WebKit/WebKit/commit/8b8402597982b6c33a4e676d79466865b68351d7
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2024-12-06 (Fri, 06 Dec 2024)
Changed paths:
M Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm
Log Message:
-----------
[UnifiedPDF] [iPadOS] Web content process crashes when clicking on annotation with trackpad
https://bugs.webkit.org/show_bug.cgi?id=284153
rdar://141018890
Reviewed by Wenson Hsieh.
PDFAnnotationPopup is not a thing on iOS family. As such, when we try to
"get" this soft-linked class, objc_getClass returns nil and we trip on
the release assert that checks for this. This means that the web process
crashes whenever we click on an annotation since we enter some
annotation tracking codepaths that make query the annotation type at
runtime.
This patch fixes the crash by making PDFAnnotation[Link|Text|Popup]
optional soft-linked classes. None of these types exist on iOS, so the
runtime annotation type checks would not make sense on the iOS family to
begin with.
An upcoming change will ensure these annotation type checks are done
correctly on all platforms through key-value lookups with the
PDFAnnotationSubType-and-adjacent interface.
* Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm:
Canonical link: https://commits.webkit.org/287470@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list