Chromium Code Reviews
DescriptionDelete WebGamepads::length.
This field has only one use, the "i < gamepads.length" check in
NavigatorGamepad.cpp. This check doesn't do anything useful and
actually introduces the following bug: if two gamepads are connected and
then the first one is disconnected, the second one remained at index 1
and was therefore dropped. (There's no identifier for a gamepad other
than its index, so this bug can't be fixed by moving it to the beginning
of the WebGamepads structure.)
So I deleted the dynamic length and rely purely on itemsLengthCap
instead.
As a drive-by, add an initialization of displayId to 0 (was unset).
(This patch is an improved version of http://crrev.com/2457703002/)
BUG=648015
Committed: https://crrev.com/5367010cc54ad46dfa4cf535fd8e6527d4460891
Cr-Commit-Position: refs/heads/master@{#441503}
Patch Set 1 #Patch Set 2 : Rebase #Patch Set 3 : Add displayId initialization to 0 #Patch Set 4 : Fix pepper_gamepad_host_unittest #Patch Set 5 : Really fix pepper_gamepad_host_unittest #Patch Set 6 : Fix components/exo #Patch Set 7 : Disable on Android #Patch Set 8 : Bring back active_state clearing in exo #
Total comments: 2
Patch Set 9 : Rebase #Messages
Total messages: 56 (39 generated)
|