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

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Sep 29 14:16:37 PDT 2014


TDZ

On Sep 29, 2014, at 2:14 PM, Rick Waldron wrote:

> 
> 
> 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
>  
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

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


More information about the es-discuss mailing list