On Fri, Aug 03, 2018 at 12:15:50PM +1000, Mark Hammond wrote:
> This is tricky. I use dump() more than I'd care to admit - it works well in
> content code because you almost never see dump() used in real sites (does
> Chrome even support it?), so there's not a huge amount of "spam" in the
> terminal. Having dump() output from *both* chrome and content can be very
> helpful.
>
> If we also wrote console.log() from content to the terminal, I fear we would
> then end up in a situation where content spams the terminal, with the only
> mitigation being to flip browser.dom.window.dump.enabled to false - but that
> means we also lose dump() output, throwing the baby out with the bathwater.
>
> So my vote would be:
>
> * Leave dump alone - it's basically a firefox-specific easter-egg and no one
> seems to mind that content *could* spam the terminal because it almost never
> does. (I know this wasn't proposed, but it's worth clarifying imo)
>
> * A new pref that would allow content console.* output to be written to this
> terminal. I'd be fine with this defaulting to true wherever
> browser.dom.window.dump.enabled does.
>
> Having "dump" in the name of this pref wouldn't be a good option, because
> IMO, it should *not* affect the behaviour of dump()
There's javascript.options.showInConsole, too, but I'm not sure it does
anything these days, despite being defined in all.js, firefox.js and
other places, it seems it was made a no-op by the error console removal
in bug 1278368.
Mike