Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp

Issue 2572323002: Delete WebGamepads::length. (Closed)
Patch Set: Bring back active_state clearing in exo Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
diff --git a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
index 546499b170c21cfbdcc6f7feab2dd0fa51615e27..0bbde969c33dc736b9e256dcc324e1a096cfec91 100644
--- a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
+++ b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
@@ -59,7 +59,7 @@ static void sampleGamepads(ListType* into) {
for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {
WebGamepad& webGamepad = gamepads.items[i];
- if (i < gamepads.length && webGamepad.connected) {
+ if (webGamepad.connected) {
GamepadType* gamepad = into->item(i);
if (!gamepad)
gamepad = GamepadType::create();

Powered by Google App Engine
This is Rietveld 408576698