Fri, 28 May 2010 02:20:58 +0100
Pass vm as 'this' to native functions
lvm.js | file | annotate | diff | comparison | revisions |
--- a/lvm.js Fri May 28 02:20:35 2010 +0100 +++ b/lvm.js Fri May 28 02:20:58 2010 +0100 @@ -380,7 +380,7 @@ if(typeof(f) == "function") { // JS native function - var ret = f.apply(null, args.map(function (a) { return a.value; })); + var ret = f.apply(this, args.map(function (a) { return a.value; })); } else {