script: Notify embedder coalesced events to resolve potential WebDriver deadlock#43202
script: Notify embedder coalesced events to resolve potential WebDriver deadlock#43202yezhizhen merged 4 commits intoservo:mainfrom
Conversation
|
🔨 Triggering try run (#22987221590) for Linux (WPT) |
|
Test results for linux-wpt from try job (#22987221590): Flaky unexpected result (21)
Stable unexpected results that are known to be intermittent (15)
|
|
✨ Try run (#22987221590) succeeded. |
We can add a test for this that stably deadlocks. |
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#58445) with upstreamable changes. |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58445) title and body. |
a419db4 to
2b8a008
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58445). |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58445). |
Signed-off-by: Euclid Ye <[email protected]>
Signed-off-by: Euclid Ye <[email protected]>
0c34f92 to
ba5b4a6
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58445). |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58445) title and body. |
Signed-off-by: Euclid Ye <[email protected]>
ba5b4a6 to
f729e2e
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58445). |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58445) title and body. |
| coalesced_move_event_ids: DomRefCell<Vec<InputEventId>>, | ||
| /// The index of the last wheel event in the pending input events queue. | ||
| /// This is non-standard behaviour. | ||
| /// According to <https://www.w3.org/TR/pointerevents/#dfn-coalesced-events>, |
There was a problem hiding this comment.
Oh, I had no idea this was in the specification. I guess we are going to have to expose these events somehow.
There was a problem hiding this comment.
Yeah. These are supposed to be a list of PointerEvents, accessed through getCoalescedEvents() in the fired PointerEvent.
We need to store extra events tho.
Personally, I hope we don't rush this for performance consideration :|
There was a problem hiding this comment.
I guess it is needed for things like shooting game/drawing.. Which should not be our current concern.
Signed-off-by: Euclid Ye <[email protected]>
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58445). |
This is a hot path. This way we free the unused memory earlier. Didn't realize the difference in #43202. Testing: This is a memory optimization that does not change visible behaviour. Signed-off-by: Euclid Ye <[email protected]>
…43262) This is now possible since #43202. We remove the workaround introduced long ago. Testing: Before #43202, this would deadlock in many tests, and is therefore covered by existing tests. [Try](https://github.com/servo/servo/actions/runs/23080857516) --------- Signed-off-by: Euclid Ye <[email protected]>
Notify embedder the coalesced wheel/mousemove event.
We also stop cloning every single entry in
pending_input_event.Testing: This should unblock the potential WebDriver thread deadlock
when receiving simultaneous wheel or pointer inputs from multiple sources.
We added a new test that stably deadlock on 74c16ff.
Firefox/Safari/Chrome all pass the new test.
Fixes: #43136 (comment)