[webkit-changes] [WebKit/WebKit] 0172e5: REGRESSION(267849 at main): MESSAGE_CHECK() failure w...

Charlie Wolfe noreply at github.com
Mon Oct 16 10:53:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0172e5a8bf88fbaed136e070c6709cba6dc93ff5
      https://github.com/WebKit/WebKit/commit/0172e5a8bf88fbaed136e070c6709cba6dc93ff5
  Author: Charlie Wolfe <charliew at apple.com>
  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 at 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 at main,
because the `didReceiveEvent()` IPC messages would not be sent to dequeue the events after terminating
the source web process. After 267849 at 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




More information about the webkit-changes mailing list