Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd98799b60c4650552667337e1fcf0728bccc783
      
https://github.com/WebKit/WebKit/commit/bd98799b60c4650552667337e1fcf0728bccc783
  Author: Abrar Rahman Protyasha <a_protya...@apple.com>
  Date:   2025-03-28 (Fri, 28 Mar 2025)

  Changed paths:
    M Source/WebKit/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations
    M Source/WebKit/Shared/Cocoa/PDFKitSoftLink.h
    M Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [Safer CPP] Address MemoryUnsafeCastChecker warnings in UnifiedPDFPlugin.mm
https://bugs.webkit.org/show_bug.cgi?id=290488
rdar://147971547

Reviewed by Chris Dumez.

We address the warnings by swapping the static_cast<T> instances with
ObjC-specific casts as appropriate.

dynamic_objc_cast<T> for PDFActionResetForm, since we are not sure what
subclass of PDFAction to expect.

checked_objc_cast<T> for PDFActionNamed, because our expectation is
already set by [actionType isEqualToString:@"Named"].

* Source/WebKit/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations:
* Source/WebKit/Shared/Cocoa/PDFKitSoftLink.h:
* Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::handlePDFActionForAnnotation):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to