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

Issue 1136463002: Pass correct length value in WebGamepads (Closed)

Created:
5 years, 7 months ago by arajp
Modified:
5 years, 7 months ago
Reviewers:
bbudge, raymes, 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

Pass correct length value in WebGamepads While building WebGamepads during enumeration, length parameter is never reset. It is always incremented. When end user re-connects gamepad, since this variable is always incremented, it will exceed the max number of supported gamepads ie 4 and leads to crash in plugins. BUG=485507 R=scottmg, raymes, bbudge Committed: https://crrev.com/bc40fa3173a092645f2702b6b072c6b3d546cc31 Cr-Commit-Position: refs/heads/master@{#329151}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use std::min for comparison #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : Fixed pending comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -5 lines) Patch
M content/browser/gamepad/gamepad_platform_data_fetcher_win.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/examples/gamepad/gamepad.cc View 2 chunks +1 line, -3 lines 0 comments Download
M ppapi/shared_impl/ppb_gamepad_shared.cc View 1 2 3 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (8 generated)
arajp
PTAL https://codereview.chromium.org/1136463002/diff/1/ppapi/examples/gamepad/gamepad.cc File ppapi/examples/gamepad/gamepad.cc (left): https://codereview.chromium.org/1136463002/diff/1/ppapi/examples/gamepad/gamepad.cc#oldcode83 ppapi/examples/gamepad/gamepad.cc:83: printf("NullImage\n"); Removed this since the pre submit checks ...
5 years, 7 months ago (2015-05-07 12:19:54 UTC) #1
bbudge
https://codereview.chromium.org/1136463002/diff/1/ppapi/shared_impl/ppb_gamepad_shared.cc File ppapi/shared_impl/ppb_gamepad_shared.cc (right): https://codereview.chromium.org/1136463002/diff/1/ppapi/shared_impl/ppb_gamepad_shared.cc#newcode14 ppapi/shared_impl/ppb_gamepad_shared.cc:14: webkit_data.length : WebKitGamepads::kItemsLengthCap; On 2015/05/07 12:19:54, arajp wrote: > ...
5 years, 7 months ago (2015-05-07 13:58:57 UTC) #2
scottmg
content/browser/gamepad/gamepad_platform_data_fetcher_win.cc lgtm
5 years, 7 months ago (2015-05-07 18:32:05 UTC) #3
arajp
PTAL https://codereview.chromium.org/1136463002/diff/1/ppapi/shared_impl/ppb_gamepad_shared.cc File ppapi/shared_impl/ppb_gamepad_shared.cc (right): https://codereview.chromium.org/1136463002/diff/1/ppapi/shared_impl/ppb_gamepad_shared.cc#newcode14 ppapi/shared_impl/ppb_gamepad_shared.cc:14: webkit_data.length : WebKitGamepads::kItemsLengthCap; On 2015/05/07 13:58:57, bbudge wrote: ...
5 years, 7 months ago (2015-05-08 06:03:20 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136463002/20001
5 years, 7 months ago (2015-05-08 06:04:20 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/69824)
5 years, 7 months ago (2015-05-08 06:18:57 UTC) #9
arajp%nvidia.com
On 2015/05/08 06:18:57, I haz the power (commit-bot) wrote: > Dry run: Try jobs failed ...
5 years, 7 months ago (2015-05-08 07:39:48 UTC) #10
bbudge
On 2015/05/08 07:39:48, arajp%nvidia.com wrote: > On 2015/05/08 06:18:57, I haz the power (commit-bot) wrote: ...
5 years, 7 months ago (2015-05-08 17:29:23 UTC) #11
bbudge
https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc File ppapi/shared_impl/ppb_gamepad_shared.cc (right): https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc#newcode16 ppapi/shared_impl/ppb_gamepad_shared.cc:16: (const size_t)webkit_data.length); Use C++ style cast. Also, you could ...
5 years, 7 months ago (2015-05-08 17:31:52 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136463002/40001
5 years, 7 months ago (2015-05-11 10:39:39 UTC) #15
arajp
https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc File ppapi/shared_impl/ppb_gamepad_shared.cc (right): https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc#newcode16 ppapi/shared_impl/ppb_gamepad_shared.cc:16: (const size_t)webkit_data.length); On 2015/05/08 17:31:52, bbudge wrote: > Use ...
5 years, 7 months ago (2015-05-11 10:40:40 UTC) #17
arajp
Please see if this fix can be pulled in to any earlier release of Chrome, ...
5 years, 7 months ago (2015-05-11 10:45:25 UTC) #18
bbudge
LGTM w/nit and suggestion https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc File ppapi/shared_impl/ppb_gamepad_shared.cc (right): https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc#newcode16 ppapi/shared_impl/ppb_gamepad_shared.cc:16: (const size_t)webkit_data.length); On 2015/05/11 10:40:40, ...
5 years, 7 months ago (2015-05-11 11:21:29 UTC) #19
arajp
Submitting a new patch in a moment. https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc File ppapi/shared_impl/ppb_gamepad_shared.cc (right): https://codereview.chromium.org/1136463002/diff/20001/ppapi/shared_impl/ppb_gamepad_shared.cc#newcode16 ppapi/shared_impl/ppb_gamepad_shared.cc:16: (const size_t)webkit_data.length); ...
5 years, 7 months ago (2015-05-11 11:29:20 UTC) #20
arajp
Done. Can you also recommend this fix to be pulled in to Chrome 42/43?
5 years, 7 months ago (2015-05-11 12:19:39 UTC) #21
bbudge
On 2015/05/11 12:19:39, arajp wrote: > Done. > Can you also recommend this fix to ...
5 years, 7 months ago (2015-05-11 12:25:11 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136463002/60001
5 years, 7 months ago (2015-05-11 12:26:47 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 7 months ago (2015-05-11 14:18:48 UTC) #26
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/bc40fa3173a092645f2702b6b072c6b3d546cc31 Cr-Commit-Position: refs/heads/master@{#329151}
5 years, 7 months ago (2015-05-11 14:19:38 UTC) #27
arajp
@bbudge I requested for integration to an earlier branch on the bug but there was ...
5 years, 7 months ago (2015-05-18 04:48:55 UTC) #28
bbudge
On 2015/05/18 04:48:55, arajp wrote: > @bbudge > I requested for integration to an earlier ...
5 years, 7 months ago (2015-05-18 17:48:48 UTC) #29
bbudge
On 2015/05/18 17:48:48, bbudge (OOO week of 5-11) wrote: > On 2015/05/18 04:48:55, arajp wrote: ...
5 years, 7 months ago (2015-05-18 17:50:07 UTC) #30
bbudge
On 2015/05/18 17:50:07, bbudge (OOO week of 5-11) wrote: > On 2015/05/18 17:48:48, bbudge (OOO ...
5 years, 7 months ago (2015-05-18 17:54:49 UTC) #31
bbudge
5 years, 7 months ago (2015-05-19 14:42:10 UTC) #32
Message was sent while issue was closed.
On 2015/05/18 17:54:49, bbudge Munich week of 5-18 wrote:
> On 2015/05/18 17:50:07, bbudge (OOO week of 5-11) wrote:
> > On 2015/05/18 17:48:48, bbudge (OOO week of 5-11) wrote:
> > > On 2015/05/18 04:48:55, arajp wrote:
> > > > @bbudge
> > > > I requested for integration to an earlier branch on the bug but there
was
> no
> > > > response. Can you help?
> > > > 
> > > > Users have no way to figure out what to do in case their plugin crashes
> when
> > > > gamepad is connected. It leads to a very poor user experience.
> > 
> > Now that the change has landed on trunk and been in a Canary, I'll request
the
> > merge. Did this make the M44 branch cut?
> 
> Actually, I can't determine if this made M44. So I'll wait until that is
> clearer. We merge back to branches one at a time, most recent first.

This is in M44. Requested merge to M43.

Powered by Google App Engine
This is Rietveld 408576698