jerryscript
jerryscript copied to clipboard
Lost captured variable with eval.
Looks like there is a chance that JerryScript miss captured variable when closure are made with eval.
See this example:
e = {};
eval('(function (e) { var v1 = { a: 2 }; function b(e) { e.a = function() { print(v1.a); }; } b(e); })')(e);
e.a();
I'm not sure about what is the expected result according to ECMA, but V8 print the value '2'. JerryScript does not.
Not reproducible any longer. Probably some patch over GC marking fixed this. Closing
Fixed by #550