Bind thread.yield passed to primitive to actual thread

This commit is contained in:
Tim Mickel 2016-06-09 15:06:24 -04:00
parent 27064ce163
commit d52938c255

View file

@ -60,7 +60,7 @@ var execute = function (sequencer, thread, blockId) {
try {
// @todo deal with the return value
primitiveReturnValue = blockFunction(argValues, {
yield: thread.yield,
yield: thread.yield.bind(thread),
done: function() {
sequencer.proceedThread(thread, blockId);
},