calling `eval` indirectly does not reflect globally
kyriosli opened this issue · comments
Kyrios LI commented
We know that eval
does not touch the local variable if it is called indirectly, for example:
(function(Math) { return (0,eval)("Math") })(1234)
// returns global.Math
and this did not work properly in v7.
Marko Mikulicic commented
yeah, it's a known problem. We currently treat eval
as a normal function.
This issue will be fixed when we finally implement compact stack frames for function calls; for that to work we'll have to treat explicit calls to eval specially (and thus indirectly also fix this test-case).
No ETA for the moment.
Marko Mikulicic commented
BTW, @kyriosli, what is your use case ?