On Tue, Aug 20, 2013 at 9:01 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
>
> BindingUtils.h we could try breaking up in various ways, but it should be
> very rare for _headers_ to include that file; for the most part such
> inclusions are a bug from my point of view.  For non-headers that include it
> (e.g. binding implementation files), it might well be common to need
> jsapi.h.

I have build-time instrumentation (using clang's -H option) that tells
me which file is responsible for an include of another.  (Because
clang avoids reading a header more than once during the compilation of
a single .cpp file, this only gives a partial picture, but it's still
useful.)

It tells me that BindingUtils.h is responsible for 824 inclusions of
jswrapper.h during a build.  And jswrapper.h includes jsapi.h.

Here are the headers that include BindingUtils.h, and how often they
are included during a build:

dom/workers/FileReaderSync.h: 2
dom/workers/XMLHttpRequest.h: 6
dom/bindings/test/TestBindingHeader.h: 6
dom/bindings/PrimitiveConversions.h: 436
dom/indexedDB/IDBFactory.h: 12
dom/encoding/TextEncoderBase.h: 0
dom/encoding/TextDecoderBase.h: 0
dom/base/nsHistory.h: 3
js/xpconnect/src/XPCQuickStubs.h: 445
layout/style/nsICSSDeclaration.h: 470
content/media/webspeech/recognition/SpeechGrammarList.h: 7
content/canvas/src/WebGLContextUtils.h: 3
content/canvas/src/WebGLContext.h: 42
content/base/src/nsXMLHttpRequest.h: 14
content/base/src/WebSocket.h: 4

So:  PrimitiveConversions.h, XPCQuickStubs.h, and nsICSSDeclaration.h
look like the important ones.

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

Reply via email to