Status: New
Owner: ----

New issue 3482 by [email protected]: GC clears outer scope, even when there's `debugger` statement in inner closure
http://code.google.com/p/v8/issues/detail?id=3482

Currently, unreferenced variables are removed from the lexical scope of nested callbacks. NBD.

When an eval() expression is present, V8 is smart enough to disable this optimization, in case one of those variables is referenced inside the eval'd string. Awesome!

The same doesn't seem to apply to a debugger statement though, which is confusing, since at that point the REPL is essentially being eval'd.

Normal behaviour:
http://jsbin.com/belat/1/edit?js,console

Optimized with debugger present:
http://jsbin.com/mehafa/2/edit?js,console :-(

Not optimized with eval present:
http://jsbin.com/datufo/1/edit?js,console

Proposed solution: whatever disables the optimization for eval statements could do the same for debugger statements


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to