Re: MozPromises are now in XPCOM

2015-08-19 Thread Kyle Huey
On Wed, Aug 19, 2015 at 5:23 PM, Bobby Holley wrote: > On Wed, Aug 19, 2015 at 2:12 PM, Kyle Huey wrote: >> >> On Wed, Aug 19, 2015 at 2:04 PM, Bobby Holley >> wrote: >> > On Wed, Aug 19, 2015 at 1:39 PM, Kyle Huey wrote: >> >> >> >> Does MozPromise have the same "skipping the event loop" behav

Re: MozPromises are now in XPCOM

2015-08-19 Thread Bobby Holley
On Wed, Aug 19, 2015 at 2:12 PM, Kyle Huey wrote: > On Wed, Aug 19, 2015 at 2:04 PM, Bobby Holley > wrote: > > On Wed, Aug 19, 2015 at 1:39 PM, Kyle Huey wrote: > >> > >> Does MozPromise have the same "skipping the event loop" behavior that > >> JS promises have? > > > > > > They do not. > > >

Re: MozPromises are now in XPCOM

2015-08-19 Thread Kyle Huey
On Wed, Aug 19, 2015 at 2:04 PM, Bobby Holley wrote: > On Wed, Aug 19, 2015 at 1:39 PM, Kyle Huey wrote: >> >> Does MozPromise have the same "skipping the event loop" behavior that >> JS promises have? > > > They do not. > >> >> Or is that limited just to StateMirroring? > > > Correct, as well as

Re: MozPromises are now in XPCOM

2015-08-19 Thread Bobby Holley
On Wed, Aug 19, 2015 at 1:39 PM, Kyle Huey wrote: > Does MozPromise have the same "skipping the event loop" behavior that > JS promises have? They do not. > Or is that limited just to StateMirroring? > Correct, as well as StateWatching. StateMirroring uses StableState to dispatch the atomic

Re: MozPromises are now in XPCOM

2015-08-19 Thread Kyle Huey
On Tue, Aug 18, 2015 at 8:17 PM, Bobby Holley wrote: > I gave a lightning talk at Whistler about MozPromise and a few other new > tools to facilitate asynchronous and parallel programming in Gecko. There > was significant interest, and so I spent some time over the past few weeks > untangling them

Re: MozPromises are now in XPCOM

2015-08-19 Thread Michael Layzell
We have a static analysis for this right now: https://dxr.mozilla.org/mozilla-central/source/build/clang-plugin/tests/TestNoRefcountedInsideLambdas.cpp And there is potential for more static analyses if we decide that we need them. We also have bug 1157788 if we decide at some point that we w

Re: MozPromises are now in XPCOM

2015-08-19 Thread smaug
Hi bholley, looks great, but a question The example mProducer->RequestFoo() ->Then(mThread, __func__, [...] (ResolveType aVal) { ... }, [...] (RejectType aVal) { ... }); uses C++ lambdas. Do we have some static analysis or such in place to protect that

Re: MozPromises are now in XPCOM

2015-08-19 Thread Ted Mielczarek
On Tue, Aug 18, 2015, at 11:17 PM, Bobby Holley wrote: > I gave a lightning talk at Whistler about MozPromise and a few other new > tools to facilitate asynchronous and parallel programming in Gecko. There > was significant interest, and so I spent some time over the past few > weeks > untangling t

MozPromises are now in XPCOM

2015-08-18 Thread Bobby Holley
I gave a lightning talk at Whistler about MozPromise and a few other new tools to facilitate asynchronous and parallel programming in Gecko. There was significant interest, and so I spent some time over the past few weeks untangling them from dom/media and hoisting them into xpcom/. Bug 1188976 ha