WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
247368
Crash in gamepads in WKWebView apps that also listen to the GameController framework themselves
https://bugs.webkit.org/show_bug.cgi?id=247368
Summary
Crash in gamepads in WKWebView apps that also listen to the GameController fr...
Brady Eidson
Reported
2022-11-02 09:22:40 PDT
Crash in gamepads in WKWebView apps that also listen to the GameController framework themselves If an app's UI process uses GameController framework directly before a web page in a WKWebView does, then the GameController framework tells that app about attached controllers ahead of time. This subtlely gets WebKit's notion of attached game controllers out of sync with reality. If the user then moves a joystick on the gamepad to cause input (but not press a button to cause the gamepad to be exposed to the web page) then we crash. (And ASSERT in debug builds)
Attachments
Patch
(1.92 KB, patch)
2022-11-02 10:05 PDT
,
Brady Eidson
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2022-11-02 10:05:12 PDT
Created
attachment 463363
[details]
Patch
Brady Eidson
Comment 2
2022-11-02 10:35:06 PDT
<
rdar://problem/100036005
>
Geoffrey Garen
Comment 3
2022-11-02 10:38:13 PDT
Comment on
attachment 463363
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=463363&action=review
r=me
> Source/WebKit/UIProcess/Gamepad/UIGamepadProvider.cpp:118 > + for (size_t i = 0; i < m_gamepads.size() && i < platformGamepads.size(); ++i) {
You can compute 'auto end = std::min(m_gamepads.size(), platformGamepads.size())' outside the loop. A bit clearer and a bit more efficient.
Brady Eidson
Comment 4
2022-11-02 15:03:15 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/6054
EWS
Comment 5
2022-11-02 16:28:53 PDT
Committed
256255@main
(809586a6b81e): <
https://commits.webkit.org/256255@main
> Reviewed commits have been landed. Closing PR #6054 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug