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

2015-08-02 Thread Zibi Braniecki
On Sunday, August 2, 2015 at 10:47:26 PM UTC-7, Wilson Page wrote: > Are we expecting that this will reduce unwanted layout/paint cycles on the > critical path and thus minimise the 'white flash of doom'? Absolutely. I believe that that's the primary goal, to replace the current race condition b

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

2015-08-02 Thread Anne van Kesteren
On Mon, Aug 3, 2015 at 7:59 AM, Jonas Sicking wrote: > Ah, yes, that makes sense. Is this yet another API where we want to basically have an internal list of promises? someInstance.doNotRenderUntil(promise) -- https://annevankesteren.nl/ ___ dev-p

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

2015-08-02 Thread Jonas Sicking
On Sun, Aug 2, 2015 at 10:28 PM, Robert O'Callahan wrote: > On Mon, Aug 3, 2015 at 4:53 PM, Jonas Sicking 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 e

Re: Use of 'auto'

2015-08-02 Thread Jonas Sicking
On Sun, Aug 2, 2015 at 3:47 AM, Xidorn Quan wrote: > On Sun, Aug 2, 2015 at 7:57 PM, Kyle Huey wrote: >> On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière 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 SomeRefCo

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

Remove nsITimer.TYPE_REPEATING_PRECISE?

2015-08-02 Thread Nicholas Nethercote
Hi, Would it be reasonable to remove nsITimer.TYPE_REPEATING_PRECISE? The docs for it say "Use this timer type with extreme caution. Chances are, this is not what you want." https://bugzilla.mozilla.org/show_bug.cgi?id=650379 introduced nsITimer.TYPE_REPEATING_PRECISE_CAN_SKIP as a safer alterna

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 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 yer.tnietoehr

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 wrote: > On Mon, Aug 3, 2015 at 8:15 AM, Jonas Sicking 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 new event is needed. The n

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

2015-08-02 Thread Robert O'Callahan
On Mon, Aug 3, 2015 at 8:15 AM, Jonas Sicking 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 new event is needed. Rob -- lbir ye,ea yer.tnietoehr rdn rdsme,anea lurpr edna e hnysnen

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 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 an easy wa

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, b

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", rig

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 as

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 wha

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 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 shoul

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 wrote: On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière 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

Re: Use of 'auto'

2015-08-02 Thread Xidorn Quan
On Sun, Aug 2, 2015 at 7:57 PM, Kyle Huey wrote: > On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière 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 b

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 t

Re: Use of 'auto'

2015-08-02 Thread Kyle Huey
On Sun, Aug 2, 2015 at 2:56 AM, Hubert Figuière 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, consider

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: 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 c

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

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 le