[X11] Fix x11::Connection::HasNextEvent() for XCB-queued events HasNextEvent() was only checking if an event is present in our own event queue. With this CL, it also checks XCB's event queue and moves the event into our own queue if one is available. This fixes certain race conditions or deadlocks that may arise when the event dispatcher (X11EventWatcherFdWatch) sees the X11 socket is not readable and there's no event queued. Note that this issue only occurs on ChromeOS, not Linux, since Linux uses X11EventWatcherGlib which calls ReadResponses() before polling. R=thestig CC=vincentchiang Fixed: 405272123 Change-Id: Ie4aed8cd8930a9a97ffe0e9af5991ea4de80777c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6618668 Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1470186}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.