Re: Include dependencies in Gecko

2013-09-08 Thread Neil
Nicholas Nethercote wrote: On Wed, Aug 8, 2012 at 12:36 PM, Nicolas Silva nsi...@mozilla.com wrote: I have an ugly script that goes through the dependency files generated by make to collect informations about dependencies. I'll clean it up if you are interested (and rewrite it in python

Re: Include dependencies in Gecko

2013-09-08 Thread Nicholas Cameron
Yes. One of many mistakes it can helpfully make for you (along with including impl headers instead of the API ones, only being correct for the current build, etc.). I believe you can setup rules to stop it doing this particular thing. But in general, IWYU is a semi-automatic process and

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Nicholas Cameron
I timed builds to see if this makes a significant difference and it did not. I timed a clobber debug build using clang with no ccache on Linux on a fast laptop. I timed using a pull from m-c about a week old (I am using this pull because I have a lot of other stats on it). I then applied

Unable to restore focus and 32-bit Linux builds

2013-09-08 Thread Nicholas Nethercote
Hi, I want to land https://bugzilla.mozilla.org/show_bug.cgi?id=910517, which is just a clean-up of memory reporters (and is blocking a bunch of follow-up work.) But I'm blocked by some baffling time-outs occurring only on 32-bit opt Linux builds. (32-bit debug Linux builds are fine.) About

Re: Unable to restore focus and 32-bit Linux builds

2013-09-08 Thread Mike Hommey
On Sun, Sep 08, 2013 at 05:29:03PM -0700, Nicholas Nethercote wrote: 0:19.91 /usr/bin/ld.gold.real: warning: skipping incompatible //usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so while searching for gtk-x11-2.0 0:19.91 /usr/bin/ld.gold.real: error: cannot find -lgtk-x11-2.0 (The full list is

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Nicholas Nethercote
On Sun, Sep 8, 2013 at 4:29 PM, Nicholas Cameron nick.r.came...@gmail.com wrote: I don't think these kind of time improvements make it worth duplicating std library code into mfbt, we may as well just pull in the headers and forget about it. A caveat would be if it makes a significant

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Benoit Jacob
We have many other headers including algorithm; it would be interesting to compare the percentage of our cpp files that recursively include algorithm before and after that patch; I suppose that just a single patch like that is not enough to move that needle much, because there are other ways that

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Mike Hommey
On Sun, Sep 08, 2013 at 08:52:23PM -0400, Benoit Jacob wrote: We have many other headers including algorithm; it would be interesting to compare the percentage of our cpp files that recursively include algorithm before and after that patch; I suppose that just a single patch like that is not

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Benoit Jacob
Again, how many other similar wins are we leaving on the table because they're only 10s on a clobber build? It's of course hard to know, which is why I've suggested the (number of useful lines of code) / (total lines of code included) ratio as a meaningful metric. But I'm completely OK with

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Mike Hommey
On Mon, Sep 09, 2013 at 10:12:35AM +0900, Mike Hommey wrote: On Sun, Sep 08, 2013 at 08:52:23PM -0400, Benoit Jacob wrote: We have many other headers including algorithm; it would be interesting to compare the percentage of our cpp files that recursively include algorithm before and after

Re: Including algorithm just to get std::min and std::max

2013-09-08 Thread Boris Zbarsky
On 9/8/13 7:29 PM, Nicholas Cameron wrote: I timed builds to see if this makes a significant difference and it did not.. The other thing that reducing .i size helps is Windows PGO memory usage. See graph at

JavaScript Style Guide. Emacs mode line.

2013-09-08 Thread ishikawa
I have been recently editing javascript files to reduce warnings but found an issue of adopted styls in comm-central thunderbird codes. I checked for the preferred style: [1] I found one reference here: http://autonome.wordpress.com/2006/03/24/javascript-style-guide-for-mozilla-projects/ [2] I

Re: Creating mock nsIPrintingPromptService

2013-09-08 Thread Gavin Sharp
Here are a few examples of mocked components: http://mxr.mozilla.org/mozilla-central/source/testing/specialpowers/content/MockPermissionPrompt.jsm?force=1 mocks nsIContentPermissionPrompt http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/bugs/test_bug61098.html?raw=1 mocks

Re: JavaScript Style Guide. Emacs mode line.

2013-09-08 Thread Gavin Sharp
On Mon, Sep 9, 2013 at 10:15 AM, ishikawa ishik...@yk.rim.or.jp wrote: So my question boils down to - what is the preferred style for JavaScript now for mozilla source code? There isn't one that applies across all of Mozilla, and I think that's not a problem.

Re: JavaScript Style Guide. Emacs mode line.

2013-09-08 Thread Karl Tomlinson
ishikawa ishik...@yk.rim.or.jp writes: - Has anyone have mode-line (or .emacs) setting to make the indentation in Emacs to follow the prefered style? I've got by so-far with M-x set-variable js-indent-level 2 when necessary, but this doesn't automatically become buffer-local, so I find myself

Re: JavaScript Style Guide. Emacs mode line.

2013-09-08 Thread ishikawa
On (2013年09月09日 12:45), Karl Tomlinson wrote: ishikawa ishik...@yk.rim.or.jp writes: - Has anyone have mode-line (or .emacs) setting to make the indentation in Emacs to follow the prefered style? I've got by so-far with M-x set-variable js-indent-level 2 when necessary, but this doesn't

Re: JavaScript Style Guide. Emacs mode line.

2013-09-08 Thread ishikawa
On (2013年09月09日 12:44), Gavin Sharp wrote: On Mon, Sep 9, 2013 at 10:15 AM, ishikawa ishik...@yk.rim.or.jp wrote: So my question boils down to - what is the preferred style for JavaScript now for mozilla source code? There isn't one that applies across all of Mozilla, and I think that's