Brendan Eich (2013-05-13T19:03:22.000Z)
github at esdiscuss.org (2013-07-12T02:27:20.800Z)
Andy Wingo wrote: > But that's precisely what we can't guarantee: unlike function > activations, the dynamic extent of a generator activation is unlimited. > We don't have finalizers, so we can't ensure that a finally block runs. Otherwise browsers would be even more trivially DoS-attacked. We went over this in 2006 and agreed then that finally cannot be guaranteed. This is true even without generators: ```js function foo() { try { while (true); } finally { alert('so sorry'); } } foo() ``` Browsers must police infinte loops and offer to kill such runaways. The `finally` can't run.