2013/9/7 Boris Zbarsky <bzbar...@mit.edu>

> On 9/7/13 12:56 PM, Benoit Jacob wrote:
>
>> https://bugzilla.mozilla.org/**show_bug.cgi?id=913847<https://bugzilla.mozilla.org/show_bug.cgi?id=913847>
>>  moves NS_IsMainThread
>> to a new MainThreadUtils.h header that's cheaper to include, and in
>> particular is all what BindingUtils.h needs (there was a helpful comment
>> about that in BindingUtils.h).
>>
>
> Excellent.  Note 
> https://bugzilla.mozilla.org/**show_bug.cgi?id=909971<https://bugzilla.mozilla.org/show_bug.cgi?id=909971>also:
>  we can stop including MainThreadUtils.h in this header too, I think.


Thanks for the link. MainThreadUtils.h is tiny, though, so this won't be a
big deal anymore.


>
>
>  
> https://bugzilla.mozilla.org/**show_bug.cgi?id=913852<https://bugzilla.mozilla.org/show_bug.cgi?id=913852>
>  makes BindingUtils.h
>> not include <algorithm> just for one use of std::min.
>>
>
> This is good, but unfortunately <algorithm> leaks in all over the place
> anyway in DOM code.
>
> The way it does that is that dom/Element.h has inline methods that need
> nsPresContext.h and Units.h.  Either one will get you things like nsRect.h
> or nsCoord.h, both of which include <algorithm>.  Oh, nsContentUtils.h
> includes Units.h too...
>

Incidentally, nsRect.h just got fixed by
https://bugzilla.mozilla.org/show_bug.cgi?id=913603

Thanks for pointing out nsCoord.h, let's fix it... (will file a bug and
block the tracking bug 912735)

Benoit


>
> We should strongly consider moving the Element methods that need those
> includes out of line, I think; not sure what we can do about nsContentUtils.
>
>
>  If there is a BindingUtils.h tracking bug, they could block it.
>>
>
> There isn't one yet.
>
> -Boris
>
>
> ______________________________**_________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/**listinfo/dev-platform<https://lists.mozilla.org/listinfo/dev-platform>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to