# HG changeset patch # User Matthew Wild # Date 1290566867 0 # Node ID 88fa4df26e9deb9fca796337679a6ddc0384c593 # Parent 6784d462999f48baad762f1a0d09589bdc8b4810 Better verification of function validity in LVM.call() diff -r 6784d462999f -r 88fa4df26e9d lvm.js --- a/lvm.js Mon Nov 22 19:38:27 2010 +0000 +++ b/lvm.js Wed Nov 24 02:47:47 2010 +0000 @@ -403,7 +403,7 @@ { return f.apply(this, args); } - else + else if(f.instructions) { var frame = {f:f,pc:0,entry:true}; if(args) @@ -415,6 +415,8 @@ frame.reg[i] = this.LValue(null); return this.run(frame); } + else + throw "Attempt to call invalid function object: "+f.toString(); }, run: function(frame) {