| Summary: | Crash in gamepads in WKWebView apps that also listen to the GameController framework themselves | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||
| Component: | WebKit Misc. | Assignee: | Brady Eidson <beidson> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ggaren, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 16 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Brady Eidson
2022-11-02 09:22:40 PDT
Created attachment 463363 [details]
Patch
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. Pull request: https://github.com/WebKit/WebKit/pull/6054 Committed 256255@main (809586a6b81e): <https://commits.webkit.org/256255@main> Reviewed commits have been landed. Closing PR #6054 and removing active labels. |