Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6389c81ebed0cf721df03e2b0b9df977da3f502
      
https://github.com/WebKit/WebKit/commit/f6389c81ebed0cf721df03e2b0b9df977da3f502
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2025-03-08 (Sat, 08 Mar 2025)

  Changed paths:
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

  Log Message:
  -----------
  [Catalyst] News/Books sometimes crash under `-[WKContentView 
_didHandleKeyEvent:eventWasHandled:]`
https://bugs.webkit.org/show_bug.cgi?id=289413
rdar://130233195

Reviewed by Abrar Rahman Protyasha.

This is a speculative fix for the crashes in rdar://130233195; the existing 
code invokes the web key
event completion handler inside of the `removeFirstMatching` lambda, but if the 
completion handler
ends up calling into code that mutates `_keyWebEventHandlers`, the vector can 
end up in a bad state.

Adjust the code to be robust against this, by removing the matching 
`KeyEventAndCompletionBlock`
from `_keyWebEventHandlers` *before* calling into the completion block.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]):

Canonical link: https://commits.webkit.org/291856@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