Bug 273924 - Explicitly clear event queues on a process swap
Summary: Explicitly clear event queues on a process swap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Charlie Wolfe
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-05-08 22:16 PDT by Charlie Wolfe
Modified: 2024-06-05 15:40 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Wolfe 2024-05-08 22:16:46 PDT
This is a speculative fix for recent reports that web pages are unresponsive to mouse events.

In 269366@main, I removed code that explicitly cleared event queues on a process swap because, after 267849@main, we could rely on in-flight completion handlers to be called for terminated web processes. However, if the web process we are navigating away from does not terminate (i.e., if it is hosting another webpage), we rely on it to dequeue the events in the UI process.

This change makes it so that we once again clear the event queues on a process swap. If the process we navigated away from has terminated or changed, we do not attempt to dequeue previous events because they have already been cleared. This way, if the source web process is unresponsive for any reason, it does not prevent events from being sent to the new page.
Comment 1 Radar WebKit Bug Importer 2024-05-08 22:18:19 PDT
<rdar://problem/127788996>
Comment 2 Charlie Wolfe 2024-05-08 22:21:48 PDT
Pull request: https://github.com/WebKit/WebKit/pull/28322
Comment 3 EWS 2024-05-09 10:09:29 PDT
Committed 278568@main (fe4ddfdad76f): <https://commits.webkit.org/278568@main>

Reviewed commits have been landed. Closing PR #28322 and removing active labels.
Comment 4 Charlie Wolfe 2024-05-10 04:22:33 PDT
rdar://127828852
Comment 5 Charlie Wolfe 2024-05-10 04:27:39 PDT
^ ignore

rdar://127788996
Comment 6 EWS 2024-06-05 15:40:18 PDT
Committed 272448.1068@safari-7618-branch (5d22b5945943): <https://commits.webkit.org/272448.1068@safari-7618-branch>

Reviewed commits have been landed. Closing PR #1318 and removing active labels.