More flexibility in the ECMAScript part? (was: Re: Futures

Domenic Denicola domenic at domenicdenicola.com
Thu Apr 18 08:26:16 PDT 2013


From: Mark S. Miller [erights at google.com]

> GC is never required to be complete. We must allow the collector to not collect some unreachable objects. This means that, without .done, there's no guarantee that an unseen-rejection bug will ever get diagnosed. Therefore we still need .done. 

I still think the best solution to this is for the developer tools to curate a list of unhandled rejections. Just like `window.onerror` and the developer console work together to display unhandled exceptions, unhandled rejections could be treated very similarly. They would appear in the console while unhandled, then disappear when/if handled. (And there could be programmatic hooks too, just like window.onerror, e.g. `window.onunhandledrejection`/`window.onrejectionhandled`.)

In case others weren't aware, the Promises/A+ group has been compiling ideas for the unhandled rejection problem at

https://github.com/promises-aplus/unhandled-rejections-spec/issues?state=open







More information about the es-discuss mailing list