On 11/12/14, 9:49 AM, James Long wrote:
Yes, I have (I work on the Firefox devtools). The best we can do (as
far as I know) is log an error when a promise is GC-ed with an
unhandled error

Note that this is what Firefox does right now, but we're moving away from that to a "report if the event loop starts spinning while a promise with an unhandled rejection is live" and "withdrawing" the report somehow if it then gets handled.

> It doesn't help at
> all for production (sure, "you aren't using promises correctly" and
> all that, but not all programmers are perfect).

Note also Domenic's proposal at http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Sep/0024.html in terms of production. It does involve a bit more work on the part of sites that want to usefully do telemetry for this, of course.

Also makes it harder for tests, because I don't think we've standardized an
onUncaughtPromiseException, and if we have, it's GC-sensitive.

Domenic's proposal above is such a thing, and not GC-sensitive.

Now it does have the false positive problem you mention later in this thread, of course.

All of this is not directly related to async/await, except insofar as those are built on top of Promise.

-Boris
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to