Didn't file a bug on this issue, so based on our IRC discussion I filed a new bug... The classes (structs) are defined here: http://lxr.mozilla.org/seamonkey/source/widget/public/nsGUIEvent.h As events are structs, all their members are public. This has led to many situations where the fields have been initialized wrongly, or even completely wrong classes have been used. This bug can be fixed in several steps. The first step would be to add constructors to the classes, and make some members of type 'const'. For example, I do not think there is a need to change eventStructType, message or time values once the object is constructed. There might be others as well. If you change those members into const and set them in the constructor, you have achieved the biggest gain. We have probably hundreds of places where we create events, and set their members (often wrongly), when it all could be done in a single location. Right now we are also relying on the values of the data members. I am not yet sure if it would be feasible to get the compiler do some checking for us (class types etc.) We use lots of type casts with events, and it would be nice if we could reduce that. The next step would be to hide data members completely, but I do not know if that is required. Just providing Get/Set for every member is not much better than the current situation. It might help with inherited and overridden methods, but I do not know if vtables would incur too big a cost in terms of space and speed.
QA contact updated
not gonna get to this...