Standardizing out-of-memory and stack-depth-exceeded errors?

Brendan Eich brendan at mozilla.com
Tue Mar 22 09:46:29 PDT 2011


On Mar 22, 2011, at 9:07 AM, Joshua Bell wrote:

> Formally describing the behavior of these runtime boundaries may be outside the scope of ECMA-262,

It's also extremely hard to do well and fairly across all JS host environments (tiny devices up to beefy servers).

Compiler writers will have to cope. Harmony includes proper tail calls now, so that will help.

http://wiki.ecmascript.org/doku.php?id=harmony:proper_tail_calls


> and some browsers choose not to expose this condition to scripts at all and simply terminate the presumably misbehaving script with appropriate user feedback. And in scenarios where the code is trusted the desired behavior may be to let the process exhaust resources and let the operating system terminate the process. But given the increase in "compile to JavaScript" scenarios where the source language may have other exception handling mechanisms it seems like this might be something to aim for convergence on, at least within sandboxed environments. Any browser vendor interest? Would discussion belong in this working group or WHATWG or ... ?

This is the list for discussion about ECMAScript language design and implementation (where strongly coupled to design) issues, so it's a fair topic.

My two cents: I don't think we'll be standardizing anything here for a long while, if ever. It's up to implementors, depending on device capabilities and competition, to do their best.

/be



More information about the es-discuss mailing list