Closed
Bug 1204439
Opened 9 years ago
Closed 9 years ago
mozilla::EventMessage shouldn't be defined with specific values
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(3 files)
6.97 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
31.67 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
12.89 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
By the fix of bug 895274, we made the event message values a named enum, mozilla::EventMessage. Therefore, gcc and VC can show the value of event message with the enum item names. So, we don't need to specify each value with "e*EventFirst". However, I'm not sure the behavior of debugger of Xcode. Steven, do you use the debugger of Xcode? Do you know if the enum value is shown as enum item name instead of integer value? If Xcode just shows the value with integer value, perhaps, we shouldn't do this now.
Flags: needinfo?(smichaud)
Comment 1•9 years ago
|
||
> Steven, do you use the debugger of Xcode?
No, I don't. And I don't know anybody who does :-(
As I understand it, XCode's "debugger" is just a wrapper around gdb (OS X 10.8.X and below) or lldb (OS X 10.9.X and above). But we really should get an XCode user to check its behavior. I'll ask in the #macdev chat room. And if that doesn't work (which it probably won't), you might want to ask the dev.mozilla.platform for XCode debugger users to look at this bug.
Flags: needinfo?(smichaud)
Assignee | ||
Comment 2•9 years ago
|
||
Thank you, Steven. I confirmed that both lldb and Xcode shows the enum item name when I print the variable value. So, we don't have any problem to fix this bug.
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
Preparation for the next patch. We should define e*EventFirst and e*EventLast with other macro since they are not actual event messages nor cannot available as case label of switch statement.
Attachment #8661713 -
Flags: review?(bugs)
Assignee | ||
Comment 4•9 years ago
|
||
Let's remove the second argument of NS_EVENT_MESSAGE(). Then, the values are defined automatically. And the First and Last message should be defined with specified message.
Attachment #8661717 -
Flags: review?(bugs)
Assignee | ||
Comment 5•9 years ago
|
||
Logging code should share a method to convert EventMessage to its name. And somebody may need this method at debugging with printf or something. We should generate it with the EventMessageList.h.
Attachment #8661721 -
Flags: review?(bugs)
Assignee | ||
Comment 6•9 years ago
|
||
Oops, I forgot to test them on tryserver... https://treeherder.mozilla.org/#/jobs?repo=try&revision=1fcd0858e367
Updated•9 years ago
|
Attachment #8661713 -
Flags: review?(bugs) → review+
Updated•9 years ago
|
Attachment #8661717 -
Flags: review?(bugs) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8661721 [details] [diff] [review] part.3 Create methods to get enum item name nice. This is what I've needed quite often, though now we have also sane mMessage values.
Attachment #8661721 -
Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0ad965c3605d https://hg.mozilla.org/integration/mozilla-inbound/rev/baeaf70bec1d https://hg.mozilla.org/integration/mozilla-inbound/rev/632ffd1d42ba
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0ad965c3605d https://hg.mozilla.org/mozilla-central/rev/baeaf70bec1d https://hg.mozilla.org/mozilla-central/rev/632ffd1d42ba
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•