On 9/7/13 8:49 PM, Nicholas Nethercote wrote:
I've been focusing entirely on jsapi.h includes. We're down to ~1480 rebuilt files when it gets touched; we started at ~2600. It's getting hard to improve, because there's a tangled clump of widely-included files that include it still either directly or indirectly: BindingUtils.h, xpcpublic.h, nsCxPusher.h, DOMJSProxyHandler.h, Workers.h, probably a couple of others I've forgotten right now. For some of these it's not too hard to break the dependency, but AFAICT we need to break the dependency for most or all of them, which is harder.
Of those 1480 files, 440 or so are generated binding .cpp files. You can't stop including jsapi.h in those, for obvious reasons.
We should looks at non-binding files that include BindingUtils.h and figure out why: I suspect they mostly want UnwrapObject (which definitely needs jsapi-ish bits, but could have a non-inline version for those callers) or WrapObject (which I expect doesn't need JSAPI for its inline parts).
DOMJSProxyHandler.h is included almost entirely in bindings code or via BindingUtils.h.
I suspect xpcpublic.h is over-included. https://bugzilla.mozilla.org/show_bug.cgi?id=910937 kills off some of that, but I bet there's more we can get rid of.
I believe nsCxPusher.h only needs jsapi.h because it needs to know sizeof(JSAutoRequest) and sizeof(JSAutoCompartment) for the members of AutoCxPusher... Not sure what we can do with that.
-Boris _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform