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

Issue 666673005: Explicitly coerce PostDispatchAction to uint32_t in DispatchEvent() (Closed)

Created:
6 years, 2 months ago by Chris Masone
Modified:
6 years, 2 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, extensions-reviews_chromium.org, tdanderson+views_chromium.org, ben+aura_chromium.org, tdresser+watch_chromium.org, tfarina, dcheng, mkwst+moarreviews-ipc_chromium.org, oshima+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, ben+views_chromium.org, stevenjb+watch_chromium.org, ozone-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@ui_enums
Project:
chromium
Visibility:
Public.

Description

Explicitly coerce PostDispatchAction to uint32_t in DispatchEvent() Intermingling enums with integer types leads to warnings on some compilers. Explicitly coercing an enum to an integer before returing it clears up the problem. Broader changes (using constants instead of the enum, returning an enum instead of an integer type) were considered but deemed too sweeping. BUG=424334 TEST=ui_unittests, events_unittests R=sky@chromium.org,sadrul@chromium.org Committed: https://crrev.com/ecbafd248eb7a2e5e735482261d14455a3fa61a5 Cr-Commit-Position: refs/heads/master@{#300588}

Patch Set 1 #

Patch Set 2 : Fix Windows compile #

Patch Set 3 : sigh. Windows. #

Total comments: 1

Patch Set 4 : Just clean up the return type issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M ui/wm/core/nested_accelerator_dispatcher_linux.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
Chris Masone
Sky, how do you feel about using kOnstants here instead of an enum?
6 years, 2 months ago (2014-10-20 18:56:31 UTC) #1
sky
https://codereview.chromium.org/666673005/diff/40001/ui/events/platform/platform_event_dispatcher.h File ui/events/platform/platform_event_dispatcher.h (left): https://codereview.chromium.org/666673005/diff/40001/ui/events/platform/platform_event_dispatcher.h#oldcode17 ui/events/platform/platform_event_dispatcher.h:17: POST_DISPATCH_NONE = 0x0, I prefer the enum. It's more ...
6 years, 2 months ago (2014-10-20 20:58:37 UTC) #2
Chris Masone
On 2014/10/20 20:58:37, sky wrote: > https://codereview.chromium.org/666673005/diff/40001/ui/events/platform/platform_event_dispatcher.h > File ui/events/platform/platform_event_dispatcher.h (left): > > https://codereview.chromium.org/666673005/diff/40001/ui/events/platform/platform_event_dispatcher.h#oldcode17 > ...
6 years, 2 months ago (2014-10-20 21:05:55 UTC) #3
sky
Can you paste the error you're getting? On Mon, Oct 20, 2014 at 2:05 PM, ...
6 years, 2 months ago (2014-10-20 22:21:36 UTC) #4
Chris Masone
It's in the linked bug: ../ui/wm/core/nested_accelerator_dispatcher_linux.cc: In member function 'virtual uint32_t wm::NestedAcceleratorDispatcherLinux::DispatchEvent(XEvent* const&)': ../ui/wm/core/nested_accelerator_dispatcher_linux.cc:89:23: warning: ...
6 years, 2 months ago (2014-10-20 22:24:20 UTC) #5
sadrul
On 2014/10/20 22:24:20, Chris Masone wrote: > It's in the linked bug: > > ../ui/wm/core/nested_accelerator_dispatcher_linux.cc: ...
6 years, 2 months ago (2014-10-20 22:31:25 UTC) #6
Chris Masone
On 2014/10/20 22:31:25, sadrul (OOO until late Oct) wrote: > On 2014/10/20 22:24:20, Chris Masone ...
6 years, 2 months ago (2014-10-20 22:34:05 UTC) #7
Chris Masone
Eh, ok. This is waaaaay simpler. I'm happy to re-open consideration of changing to constants, ...
6 years, 2 months ago (2014-10-20 23:05:38 UTC) #9
sky
I like simple: LGTM
6 years, 2 months ago (2014-10-20 23:10:37 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/666673005/60001
6 years, 2 months ago (2014-10-21 00:21:57 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/27407)
6 years, 2 months ago (2014-10-21 01:34:40 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/666673005/60001
6 years, 2 months ago (2014-10-21 22:46:19 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years, 2 months ago (2014-10-22 00:55:58 UTC) #17
commit-bot: I haz the power
6 years, 2 months ago (2014-10-22 04:04:23 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ecbafd248eb7a2e5e735482261d14455a3fa61a5
Cr-Commit-Position: refs/heads/master@{#300588}

Powered by Google App Engine
This is Rietveld 408576698