Use ContiguousEnumSerializer for EventMessage in nsGUIEventIPC.h

RESOLVED FIXED in Firefox 59

Status

()

enhancement
P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: tedd, Assigned: Alex_Gaynor)

Tracking

unspecified
mozilla59
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox59 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Currently a custom implementation for EventMessage enum serialization in ./widget/nsGUIEventIPC.h [1] is used, however, helper classes exists [2] which do the proper enum serialization/deserialization along with the value range validation. An example use of this helper class can be found here [3].

The same practice should be used for the EventMessage enum in ./widget/nsGUIEventIPC.h

[1] http://searchfox.org/mozilla-central/rev/1c13d5cf85f904afb8976c02a80daa252b893fca/widget/nsGUIEventIPC.h#24
[2] http://searchfox.org/mozilla-central/rev/05c4c3bc0cfb9b0fc66bdfc8c47cac674e45f151/ipc/glue/IPCMessageUtils.h#212
[3] http://searchfox.org/mozilla-central/rev/1c13d5cf85f904afb8976c02a80daa252b893fca/dom/bindings/ErrorIPCUtils.h#17-21
This is how I patched my code, however I haven't run any tests so this is untested. But it compiles cleanly.
Priority: -- → P3
Markus, any chance you can make some time to look at this one? It looked good to me.
Flags: needinfo?(mstange)
Flags: needinfo?(mstange)
Attachment #8910222 - Flags: review?(botond)
Comment on attachment 8910222 [details] [diff] [review]
NOT TESTED - Convert ParamTraits specialization to use helper struct

Review of attachment 8910222 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me!
Attachment #8910222 - Flags: review?(botond) → review+
Posted patch 1401111.patchSplinter Review
Assignee: nobody → agaynor
Attachment #8910222 - Attachment is obsolete: true
Attachment #8933726 - Flags: review+
Keywords: checkin-needed
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ee0a6b975c1b
Use ContiguousEnumSerializer for EventMessage ParamTraits; r=botond
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ee0a6b975c1b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.