chrome code (chrome code is the code running in the browser itself, as opposed to content,
nsIClassInfo properties had to be addressed through their interfaces. So instead of saying
docShell.QueryInterface(Ci.nsIWebNavigation).canGoBack one might say
docShell.nsIWebNavigation.canGoBack. Obviously, this wouldn’t work for web pages, so there had to be another solution.
dom/src/* and weighed in at over a megabyte. Because midl only ran on Windows, every time a developer wanted to change an IDL file, he would have to find a developer who ran on Windows to generate new stubs for the affected interfaces before proceeding.
In 2001, John Bandhauer (jband) and Johnny Stenback (jst) started working to teach XPConnect about
nsIClassInfo and to replace the midl generated code by simply calling functions through
xptcall. This resulted in a significant codesize reduction and allowed people to change idl files, even if they didn’t run Windows. Furthermore, in order to support some of the weirder aspects of the DOM (such as setting
window.location changing the currently shown page) the
nsIXPCScriptable, JS would be forced to use uglier function calls.