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

Issue 1028673002: Fix use of arraysize in GamepadProvider (Closed)

Created:
5 years, 9 months ago by kenrb
Modified:
5 years, 9 months ago
Reviewers:
inferno, bajones, scottmg
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix use of arraysize in GamepadProvider Arraysize was being used for destination array sizes in memcpy and memcmp, which returns the number of elements rather than the number of bytes, as these functions expect. The result is that the entire arrays were not getting copied. BUG=469151 Committed: https://crrev.com/da87e71938a3aa652dd4a494ba0c22e28a67c948 Cr-Commit-Position: refs/heads/master@{#321587}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Changed to simpler sizeof() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -10 lines) Patch
M content/browser/gamepad/gamepad_provider.cc View 1 1 chunk +10 lines, -10 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
kenrb
Scott: PTAL?
5 years, 9 months ago (2015-03-20 14:52:00 UTC) #3
inferno
https://codereview.chromium.org/1028673002/diff/1/content/browser/gamepad/gamepad_provider.cc File content/browser/gamepad/gamepad_provider.cc (right): https://codereview.chromium.org/1028673002/diff/1/content/browser/gamepad/gamepad_provider.cc#newcode174 content/browser/gamepad/gamepad_provider.cc:174: memcmp(id_, pad.id, arraysize(id_) * sizeof(id_[0])) == 0 && why ...
5 years, 9 months ago (2015-03-20 15:13:27 UTC) #5
kenrb
https://codereview.chromium.org/1028673002/diff/1/content/browser/gamepad/gamepad_provider.cc File content/browser/gamepad/gamepad_provider.cc (right): https://codereview.chromium.org/1028673002/diff/1/content/browser/gamepad/gamepad_provider.cc#newcode174 content/browser/gamepad/gamepad_provider.cc:174: memcmp(id_, pad.id, arraysize(id_) * sizeof(id_[0])) == 0 && On ...
5 years, 9 months ago (2015-03-20 15:53:02 UTC) #7
inferno
lgtm
5 years, 9 months ago (2015-03-20 15:57:09 UTC) #8
scottmg
lgtm
5 years, 9 months ago (2015-03-20 16:36:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028673002/20001
5 years, 9 months ago (2015-03-20 16:37:34 UTC) #12
bajones
lgtm
5 years, 9 months ago (2015-03-20 16:39:03 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-03-20 17:27:03 UTC) #15
commit-bot: I haz the power
5 years, 9 months ago (2015-03-20 17:27:51 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/da87e71938a3aa652dd4a494ba0c22e28a67c948
Cr-Commit-Position: refs/heads/master@{#321587}

Powered by Google App Engine
This is Rietveld 408576698