fixed outer script variable scope for TELL/ASK and OF

upd4.2
jmoenig 2018-07-11 14:57:17 +02:00
rodzic 5abe5954e4
commit b5da7311dd
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -4268,3 +4268,4 @@ Translation Updates:
180711
------
* GUI: added support for "&lang:nn" url parameter, made it non-permanent
* Threads: fixed outer script variable scope for TELL/ASK and OF

Wyświetl plik

@ -62,7 +62,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
TableFrameMorph, ColorSlotMorph, isSnapObject*/
modules.threads = '2018-July-10';
modules.threads = '2018-July-11';
var ThreadManager;
var Process;
@ -3401,8 +3401,13 @@ 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.parentFrame =
otherObj.variables;
} else {
result.outerContext.variables.parentFrame = otherObj.variables;
}
}
return result;
};