Re: Allowing web apps to delay layout/rendering on startup

2015-08-02 Thread Jonas Sicking
On Sun, Aug 2, 2015 at 2:41 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Mon, Aug 3, 2015 at 8:15 AM, Jonas Sicking jo...@sicking.cc wrote: Often times the chrome of a webapp is ready before various other things that are loaded during initial page load is loaded. OK then, I guess a

Re: Allowing web apps to delay layout/rendering on startup

2015-08-02 Thread Robert O'Callahan
On Sun, Aug 2, 2015 at 11:58 AM, Zibi Braniecki zbigniew.branie...@gmail.com wrote: So maybe we would need another event that the website fires to indicate when it for paint/cache/screenshot. Assuming pages have an easy way to block the 'load' event until they're ready, can this just be the

Re: Use of 'auto'

2015-08-02 Thread smaug
A new type of error 'auto' seems to cause, now seen on m-i, is auto foo = new SomeRefCountedFoo(); That hides that foo is a raw pointer but we should be using nsRefPtr. So please, consider again when about to use auto. It usually doesn't make the code easier to read, and it occasionally just

Re: Use of 'auto'

2015-08-02 Thread Kyle Huey
On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière h...@mozilla.com wrote: On 02/08/15 04:55 AM, smaug wrote: A new type of error 'auto' seems to cause, now seen on m-i, is auto foo = new SomeRefCountedFoo(); That hides that foo is a raw pointer but we should be using nsRefPtr. So please,

Running gaia unit tests with gdb

2015-08-02 Thread Julien Wajsberg
(Cross-post to dev-platform and dev-b2g, reply-to dev-b2g) Hi, sometimes we need to track crashes, and sometimes those are crashes happening with unit tests. So I just landed in bug 1177165 a change so that you can to run the test runner in gdb. You can find more information on MDN [1]. Please

Re: Allowing web apps to delay layout/rendering on startup

2015-08-02 Thread Zibi Braniecki
On Sunday, August 2, 2015 at 2:03:28 AM UTC-7, Robert O'Callahan wrote: On Sun, Aug 2, 2015 at 11:58 AM, Zibi Braniecki wrote: So maybe we would need another event that the website fires to indicate when it for paint/cache/screenshot. Assuming pages have an easy way to block the 'load'

Re: Use of 'auto'

2015-08-02 Thread smaug
On 08/02/2015 01:47 PM, Xidorn Quan wrote: On Sun, Aug 2, 2015 at 7:57 PM, Kyle Huey m...@kylehuey.com wrote: On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière h...@mozilla.com wrote: On 02/08/15 04:55 AM, smaug wrote: A new type of error 'auto' seems to cause, now seen on m-i, is auto foo =

Re: Use of 'auto'

2015-08-02 Thread Hubert Figuière
On 02/08/15 07:17 AM, smaug wrote: Probably we should generally avoid using constructor directly for those cases. Instead, use helper functions like MakeUnique() or MakeAndAddRef(), which is much safer. MakeAndAddRef would have the same problem as MakeUnique. Doesn't really tell what type

Re: Use of 'auto'

2015-08-02 Thread Hubert Figuière
On 02/08/15 04:55 AM, smaug wrote: A new type of error 'auto' seems to cause, now seen on m-i, is auto foo = new SomeRefCountedFoo(); That hides that foo is a raw pointer but we should be using nsRefPtr. So please, consider again when about to use auto. It usually doesn't make the code

Re: Use of 'auto'

2015-08-02 Thread smaug
On 08/02/2015 02:34 PM, Hubert Figuière wrote: On 02/08/15 07:17 AM, smaug wrote: Probably we should generally avoid using constructor directly for those cases. Instead, use helper functions like MakeUnique() or MakeAndAddRef(), which is much safer. MakeAndAddRef would have the same problem

Re: Use of 'auto'

2015-08-02 Thread Joshua Cranmer 
On 8/2/2015 10:21 AM, Boris Zbarsky wrote: On 8/2/15 7:34 AM, Hubert Figuière wrote: This is also part of why I'd suggest having an construction method that will return a smart pointer - preventing the use of raw pointers. Returning an already_AddRefed would prevent the use of raw pointers,

Re: Use of 'auto'

2015-08-02 Thread Xidorn Quan
On Sun, Aug 2, 2015 at 7:57 PM, Kyle Huey m...@kylehuey.com wrote: On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière h...@mozilla.com wrote: On 02/08/15 04:55 AM, smaug wrote: A new type of error 'auto' seems to cause, now seen on m-i, is auto foo = new SomeRefCountedFoo(); That hides that foo

Re: Use of 'auto'

2015-08-02 Thread Hubert Figuière
On 02/08/15 05:57 AM, Kyle Huey wrote: On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière h...@mozilla.com wrote: On 02/08/15 04:55 AM, smaug wrote: A new type of error 'auto' seems to cause, now seen on m-i, is auto foo = new SomeRefCountedFoo(); That hides that foo is a raw pointer but we

Re: Use of 'auto'

2015-08-02 Thread Boris Zbarsky
On 8/2/15 7:34 AM, Hubert Figuière wrote: This is also part of why I'd suggest having an construction method that will return a smart pointer - preventing the use of raw pointers. Returning an already_AddRefed would prevent the use of raw pointers, but would leak if the caller used auto,

Re: Allowing web apps to delay layout/rendering on startup

2015-08-02 Thread Jonas Sicking
On Sun, Aug 2, 2015 at 2:03 AM, Robert O'Callahan rob...@ocallahan.org wrote: On Sun, Aug 2, 2015 at 11:58 AM, Zibi Braniecki zbigniew.branie...@gmail.com wrote: So maybe we would need another event that the website fires to indicate when it for paint/cache/screenshot. Assuming pages have

Re: Allowing web apps to delay layout/rendering on startup

2015-08-02 Thread Wilson Page
Are we expecting that this will reduce unwanted layout/paint cycles on the critical path and thus minimise the 'white flash of doom'? If not what are the options for killing this? If the user has to see anything before the new 'please-draw-me' event, we'd probably like to see the app's background

Re: Allowing web apps to delay layout/rendering on startup

2015-08-02 Thread Robert O'Callahan
On Mon, Aug 3, 2015 at 4:53 PM, Jonas Sicking jo...@sicking.cc wrote: The need is not for an event, no? But rather for an API which allows the page to tell the browser that it's ready for initial rendering? Right. Which gets turned into an event that's sent to the browser. Rob -- lbir ye,ea