The mozilla-central code base is, for the most part, not const-correct. Developers who want to write const-correct code commonly have to rewrite or const-overload functions in other parts of the source. We propose using dehydra to automatically const-correct as much of the code base as possible.
My main experience has been with nsIFrame and nsIView, neither of which is const-correct. I don't think that either of these classes go through XPIDL, since some of the functions are already const-corrected. When working on the CSS transforms patch, I ended up const-correcting a good number of member and helper functions, and though I don't have as much experience working with other parts of the code base, I'm pretty sure that other modules could be similarly improved. Even if we weren't able to make the entire code base const-correct, if we were simply able to make some of the modules internally const-correct, I think it would make the code a lot less bug-prone.
Well, doing this mozilla-wide sounds tricky if only because breaking public interfaces sucks. But i'm sure some of this is doable. best place to start would be to find a piece of code that isn't const correct and start devising steps needed to detect & convert it.
While this is a good thing, we're not going to write an analysis for it, and I think people are better about sticking const in places where it logically belongs nowadays.
Status: NEW → RESOLVED
Last Resolved: a day ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.