Jacek Caban (@jacek) commented about dlls/jscript/tests/api.js:
tmp = Object.prototype.valueOf.call(nullDisp); ok(tmp === nullDisp, "nullDisp.valueOf != nullDisp");
+(function(global) { + var i, code = "this.foobar = 1234"; + function context() {} + + var direct = [ + function() { eval(code); }, + function() { (eval)(code); }, + function() { (function(eval) { eval(code); }).call(this, eval); }, + function() { eval("eval(" + code + ")"); } + ]; + + for(i = 0; i < direct.length; i++) { + ok(!("foobar" in context), "direct[" + i + "] has foobar"); Is there any reason to use a function for the context? Could we just use something like `context = {};` here and not have to worry about cleaning it?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2942#note_34447