From e57af6137d13edeee40f45eeececc469962ce803 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 27 Jul 2020 07:43:11 +0200 Subject: [PATCH] fixed binding contexts to other receivers variable scope for ASK / TELL --- HISTORY.md | 3 +++ snap.html | 2 +- src/threads.js | 11 ++--------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index cda0ebde..2997174f 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,9 @@ ## in development: +### 2020-07-27 +* threads: fixed binding contexts to other receivers (variable scope for ASK / TELL) + ### 2020-07-26 * objects: fixed sprite speech balloon display for sounds * cleaned up, grouped and annotated libraries, thanks, Brian! diff --git a/snap.html b/snap.html index 49efb445..fbc9107c 100755 --- a/snap.html +++ b/snap.html @@ -8,7 +8,7 @@ - + diff --git a/src/threads.js b/src/threads.js index 5d4d8fef..d7d2abbc 100644 --- a/src/threads.js +++ b/src/threads.js @@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK, TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/ -modules.threads = '2020-July-24'; +modules.threads = '2020-July-27'; var ThreadManager; var Process; @@ -5037,14 +5037,7 @@ Process.prototype.reportContextFor = function (context, otherObj) { result.outerContext = copy(result.outerContext); result.outerContext.variables = copy(result.outerContext.variables); result.outerContext.receiver = otherObj; - if (result.outerContext.variables.parentFrame) { - result.outerContext.variables.parentFrame = - copy(result.outerContext.variables.parentFrame); - result.outerContext.variables.parentFrame.parentFrame = - otherObj.variables; - } else { - result.outerContext.variables.parentFrame = otherObj.variables; - } + result.outerContext.variables.parentFrame = otherObj.variables; } return result; };