On 10/16/14 5:32 AM, Nicholas Nethercote wrote:

I was wondering what people think is the worst piece of code in the
entire Mozilla codebase. I'll leave the exact meanings of "worst" and
"piece of code" unspecified...

It's gone now, but I always held a special hate for nsIDialogParamBlock.

http://mxr.mozilla.org/seamonkey/source/embedding/components/windowwatcher/public/nsIDialogParamBlock.idl

It was a horrid XPCOM thing to pass strings around for creating a prompt, by way of magic numbers. Want to set the title? Set string #12! Or maybe it was #3. They're listed in the completely separate nsPIPromptService.idl, but they're confusing (#12 is eDialogTitle, #3 is eTitleMessage), and IIRC some are complete lies.

Most of the other original prompting code was similarly bad.

Justin
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to