Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0172e5a8bf88fbaed136e070c6709cba6dc93ff5
      
https://github.com/WebKit/WebKit/commit/0172e5a8bf88fbaed136e070c6709cba6dc93ff5
  Author: Charlie Wolfe <[email protected]>
  Date:   2023-10-16 (Mon, 16 Oct 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

  Log Message:
  -----------
  REGRESSION(267849@main): MESSAGE_CHECK() failure when mouse events are being 
handled during a process swap
https://bugs.webkit.org/show_bug.cgi?id=263175
rdar://116942710

Reviewed by Wenson Hsieh.

On a process swap, events queued in the UI process will be cleared. This was 
needed before 267849@main,
because the `didReceiveEvent()` IPC messages would not be sent to dequeue the 
events after terminating
the source web process. After 267849@main, it’s possible for the completion 
handler to be called after
clearing the event queues. So the message checks in `didReceiveEvent()` 
expecting the event queues to
not be empty will fail. We can expect the completion handler to be called for 
crashed web processes, so
we shouldn’t need to clear the event queues on process termination anymore.

We should also send the next queued mouse/touch/key events even after the web 
process crashes.

Added `ProcessSwap.MouseEventDuringCrossSiteProvisionalNavigation` to verify 
the web process no longer
crashes when a mouse event is being handled during a cross-site provisional 
navigation.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sendMouseEvent):
(WebKit::WebPageProxy::sendKeyEvent):
(WebKit::WebPageProxy::touchEventHandlingCompleted):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::mouseEventHandlingCompleted):
(WebKit::WebPageProxy::keyEventHandlingCompleted):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to