Toplevel 'let' binding can be left permanently uninitialized after an error

Rick Waldron waldron.rick at gmail.com
Mon Sep 29 14:14:58 PDT 2014


On Mon, Sep 29, 2014 at 4:17 PM, Jason Orendorff <jason.orendorff at gmail.com>
wrote:

> SpiderMonkey hacker Jeff Walden noticed this. Consider a web page that
> loads and runs this script:
>
>     throw 0;
>     let x;
>
> This leaves the binding 'x' uninitialized. There's no way to get rid
> of a lexical binding or to initialize it later. The binding is just
> permanently hosed; any attempt to read or write it will throw.
>

Can you clarify "write"? Does this mean assignment? Why would assignment
throw?

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140929/9277e024/attachment.html>


More information about the es-discuss mailing list