You could either put the code in the headers for the relevant classes, or the base mechanism in WTF and specific overloads in a catchall header for WebCore. You don't have to put the basic mechanism in WebCore just to have overloads for WebCore types.
- Maciej On Nov 9, 2012, at 9:29 AM, Rafael Brandao <rafael.l...@openbossa.org> wrote: > I was just trying to avoid adding code on other places, and it seemed wrong > to include WebCore files inside WTF. > If there's no problem on changing other files (like IntRect, IntSize, etc.), > I have no problem with moving the appropriate overload around > ENABLE(DEBUG_HELPERS). > > Regards, > > On Fri, Nov 9, 2012 at 2:19 PM, Filip Pizlo <fpi...@apple.com> wrote: > I like this patch. > > But I don't quite see why this couldn't live in WTF. It would certainly be > useful from places in JSC and WTF, so it would be unfortunate if this was > WebCore-only. And I don't see the circular dependency. And if you wanted to > have a wtfPrint() for IntRect, then couldn't you put the appropriate > overload(s) in IntRect's header file? > > -F > > > > On Nov 9, 2012, at 6:18 AM, Rafael Brandao <rafael.l...@openbossa.org> wrote: > >> I've just submitted a patch for this issue (bug 90823). I'm also a shameless >> printfer and I believe the project could benefit with such debugging helpers. >> I've decided to isolate the debug definitions in a single place, so instead >> of adding alien code on IntRect to teach him how to debug, they're all in >> DebugHelpers.cpp/.h. This code is also protected by ENABLE(DEBUG_HELPERS) so >> people could keep things untouched if they want to. >> >> Instead of putting it in WTF like the original proposal, I've put into >> WebCore. The reasoning behind it was a cyclic dependency over >> WTF and WebCore that would be introduced if I've tried to isolate things in >> a single place in WTF (for example, there in WTF I would need to include >> WebCore's IntRect, which is most likely wrong). >> >> Regards, >> >> -- >> Rafael Brandao @ INdT >> _______________________________________________ >> webkit-dev mailing list >> webkit-dev@lists.webkit.org >> http://lists.webkit.org/mailman/listinfo/webkit-dev > > > > > -- > Rafael Brandao @ INdT > _______________________________________________ > webkit-dev mailing list > webkit-dev@lists.webkit.org > http://lists.webkit.org/mailman/listinfo/webkit-dev
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev