on master help sign in
Fix callstack use in ffiWrap.

Getting the old stack from the vm can't work as it's not written back there.

commit275e95c584fbe145cb33bff1bc1fd481cd5cac8a authorNiklas Larsson <niklas@mm.st> dateWed 22 Jul 2015, 01:01 (11 years ago) parent7a2dc7b
1 file changed+2−1
jsrts/Runtime-common.js+2−1
jsrts/Runtime-common.js+2−1
@@ -63,6 +63,7 @@ var i$CALL = function(fun,args) {
6363
6464var i$ffiWrap = function(fid,oldbase,myoldbase) {
6565 return function() {
66+ var oldstack = i$callstack;
6667 i$callstack = [];
6768
6869 var res = fid;
@@ -82,7 +83,7 @@ var i$ffiWrap = function(fid,oldbase,myoldbase) {
8283 res = i$ret;
8384 }
8485
85− i$callstack = i$vm.callstack;
86+ i$callstack = oldstack;
8687
8788 return i$ret;
8889 }