Masayuki Nakano wrote:
I have no idea why you thinks eventStructType should be only in debug build.
Only because you mentioned that you were looking at possibly removing it. If that happens, then I was suggesting it might be helpful to keep around in debug builds for assertions like nsINode::AsElement does. (Although there it asserts IsElement(), which relies on a non-debug-only field.)
If we can fix above issue, I guess that we can completely hide the member. Then, if we chose to use virtual method for implementing Is*Event(), we can remove it. But I think that it's better to use eventStructType in them since they are called a lot of times. So, non-virtual methods give better performance for us.
Yeah, especially for cases where you know for sure that the struct will be of a certain type, it would be nice to be able to avoid the virtual call.
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform