Switching to async/await from Task.jsm/yield

Paolo Amadini paolo.02.prg at amadzone.org
Mon Mar 20 14:01:31 UTC 2017

On 3/17/2017 5:19 PM, Dave Townsend wrote:
> One issue I have just spotted is that Task.jsm uses a JavaScript
> implementation of promises under the hood while async/await obviously uses
> our native implementation in the JS engine.

You're inadvertently losing test coverage if you convert everything
before landing <https://bugzilla.mozilla.org/show_bug.cgi?id=1242505>.
I strongly recommend fixing unhandled rejection reporting for browser
tests before any mass conversion from Task.jsm to async functions.

With regard to async stacks, I think the important thing is ensuring
that we have useful traces for test failures that happen in async
functions. We are supposed to have useful stack rewriting in Task.jsm,
but I believe that it did break at some point, because we don't have
any test checking that we don't add extraneous frames to the stack. I
started some work to fix that situation in bug 1144353, but wasn't able
to continue in that area. There might be no need to work on that
particular bug now if this is functionality that comes for free when
using async functions.


More information about the firefox-dev mailing list