Cleanly handle deleting running scripts ()

* Cleanly handle deleting running scripts

* Turn off glow request on retire thread; add null check
This commit is contained in:
Tim Mickel 2016-09-15 13:51:40 -04:00 committed by GitHub
parent 9b4433069e
commit 8987330853
4 changed files with 28 additions and 1 deletions
src/engine

View file

@ -185,6 +185,10 @@ Blocks.prototype.blocklyListen = function (e, isFlyout, opt_runtime) {
if (this._blocks[e.blockId].shadow) {
return;
}
// Inform any runtime to forget about glows on this script.
if (opt_runtime && this._blocks[e.blockId].topLevel) {
opt_runtime.quietGlow(e.blockId);
}
this.deleteBlock({
id: e.blockId
});