jerryscript icon indicating copy to clipboard operation
jerryscript copied to clipboard

Lost captured variable with eval.

Open ILyoan opened this issue 11 years ago • 2 comments

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.

ILyoan avatar Jul 30 '15 10:07 ILyoan

Not reproducible any longer. Probably some patch over GC marking fixed this. Closing

ILyoan avatar Sep 07 '15 05:09 ILyoan

Fixed by #550

ruben-ayrapetyan avatar Sep 07 '15 11:09 ruben-ayrapetyan