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

Issue 400213002: Refcount touch tracking ids to prevent freeing them too early. (Closed)

Created:
6 years, 5 months ago by tdresser
Modified:
6 years, 5 months ago
Reviewers:
sadrul
CC:
chromium-reviews, tfarina, tdanderson
Project:
chromium
Visibility:
Public.

Description

Currently, destroying a ui::TouchEvent removes its tracking id from the slot mapping. Because MenuEventDispatcher::DispatchEvent was creating (and destroying) a touch event, the tracking id was being removed too early. This patch refcounts the tracking ids, so the tracking id won't be removed until it should be. BUG=394437 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285580

Patch Set 1 #

Patch Set 2 : Switch to refcounting tracking ids. #

Patch Set 3 : Fix non-linux platforms. #

Total comments: 2

Patch Set 4 : Add test. #

Total comments: 2

Patch Set 5 : Use ui::TouchEvents in test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -2 lines) Patch
M ui/events/cocoa/events_mac.mm View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/event.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/event_utils.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/events_stub.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M ui/events/ozone/events_ozone.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/win/events_win.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M ui/events/x/events_x_unittest.cc View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
M ui/events/x/touch_factory_x11.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M ui/events/x/touch_factory_x11.cc View 1 2 3 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
tdresser
I'm hoping you have some ideas on how to make this a bit more robust. ...
6 years, 5 months ago (2014-07-18 13:58:21 UTC) #1
tdresser
I'm not happy with much of the naming in this patch - I could rename ...
6 years, 5 months ago (2014-07-18 17:46:24 UTC) #2
tdresser
On 2014/07/18 17:46:24, tdresser wrote: > I'm not happy with much of the naming in ...
6 years, 5 months ago (2014-07-22 16:01:01 UTC) #3
sadrul
https://codereview.chromium.org/400213002/diff/40001/ui/events/x/events_x.cc File ui/events/x/events_x.cc (right): https://codereview.chromium.org/400213002/diff/40001/ui/events/x/events_x.cc#newcode656 ui/events/x/events_x.cc:656: factory->AcquireSlotForTrackingID(tracking_id); Should we do this automagically from GetTouchId() when ...
6 years, 5 months ago (2014-07-22 16:49:16 UTC) #4
tdresser
https://codereview.chromium.org/400213002/diff/40001/ui/events/x/events_x.cc File ui/events/x/events_x.cc (right): https://codereview.chromium.org/400213002/diff/40001/ui/events/x/events_x.cc#newcode656 ui/events/x/events_x.cc:656: factory->AcquireSlotForTrackingID(tracking_id); On 2014/07/22 16:49:16, sadrul wrote: > Should we ...
6 years, 5 months ago (2014-07-22 20:17:09 UTC) #5
sadrul
lgtm
6 years, 5 months ago (2014-07-22 20:20:05 UTC) #6
tdresser
The CQ bit was checked by tdresser@chromium.org
6 years, 5 months ago (2014-07-22 20:20:32 UTC) #7
sadrul
On 2014/07/22 20:20:05, sadrul wrote: > lgtm Can you look into adding a test in ...
6 years, 5 months ago (2014-07-22 20:21:06 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/400213002/40001
6 years, 5 months ago (2014-07-22 20:22:12 UTC) #9
tdresser
The CQ bit was unchecked by tdresser@chromium.org
6 years, 5 months ago (2014-07-22 20:29:52 UTC) #10
tdresser
Added test.
6 years, 5 months ago (2014-07-22 21:09:32 UTC) #11
sadrul
https://codereview.chromium.org/400213002/diff/60001/ui/events/x/events_x_unittest.cc File ui/events/x/events_x_unittest.cc (right): https://codereview.chromium.org/400213002/diff/60001/ui/events/x/events_x_unittest.cc#newcode319 ui/events/x/events_x_unittest.cc:319: IncrementTouchIdRefCount(scoped_xevent0); Instead of calling GetTouchId()/IncrementTouchIdRefCount(), can you create a ...
6 years, 5 months ago (2014-07-22 21:23:21 UTC) #12
tdresser
https://codereview.chromium.org/400213002/diff/60001/ui/events/x/events_x_unittest.cc File ui/events/x/events_x_unittest.cc (right): https://codereview.chromium.org/400213002/diff/60001/ui/events/x/events_x_unittest.cc#newcode319 ui/events/x/events_x_unittest.cc:319: IncrementTouchIdRefCount(scoped_xevent0); On 2014/07/22 21:23:20, sadrul wrote: > Instead of ...
6 years, 5 months ago (2014-07-23 15:15:50 UTC) #13
sadrul
lgtm++ Thanks!
6 years, 5 months ago (2014-07-24 18:28:23 UTC) #14
tdresser
The CQ bit was checked by tdresser@chromium.org
6 years, 5 months ago (2014-07-24 18:42:37 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/400213002/100001
6 years, 5 months ago (2014-07-24 18:43:59 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel_swarming on tryserver.chromium ...
6 years, 5 months ago (2014-07-24 19:59:00 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-24 20:35:53 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel_swarming/builds/2008)
6 years, 5 months ago (2014-07-24 20:35:54 UTC) #19
tdresser
The CQ bit was checked by tdresser@chromium.org
6 years, 5 months ago (2014-07-24 20:50:00 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/400213002/100001
6 years, 5 months ago (2014-07-24 20:53:15 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel_swarming on tryserver.chromium ...
6 years, 5 months ago (2014-07-24 21:28:21 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-24 22:03:52 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel_swarming/builds/2096)
6 years, 5 months ago (2014-07-24 22:03:52 UTC) #24
tdresser
The CQ bit was checked by tdresser@chromium.org
6 years, 5 months ago (2014-07-25 12:23:40 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdresser@chromium.org/400213002/100001
6 years, 5 months ago (2014-07-25 12:24:46 UTC) #26
commit-bot: I haz the power
6 years, 5 months ago (2014-07-25 12:58:03 UTC) #27
Message was sent while issue was closed.
Change committed as 285580

Powered by Google App Engine
This is Rietveld 408576698