Implement "Stop this script" function

Existing implementation incorrectly terminates the entire thread.
See: http://llk.github.io/scratch-vm/#144142535
This commit is contained in:
griffpatch 2017-02-08 09:44:10 +00:00
parent aecc3bf893
commit 9cb595312e
4 changed files with 28 additions and 7 deletions
src/engine

View file

@ -183,8 +183,8 @@ var execute = function (sequencer, thread) {
stopOtherTargetThreads: function () {
runtime.stopForTarget(target, thread);
},
stopThread: function () {
sequencer.retireThread(thread);
stopThisScript: function () {
thread.stopThisScript();
},
startProcedure: function (procedureCode) {
sequencer.stepToProcedure(thread, procedureCode);