浏览代码

kernel: Different thisContext setup.

Context tree is hydrated in accordance
with TMethodContext handling of the context;
specifically, chain goes to outerContext if present,
only otherwise to homeContext.

Cleaner solution would be to hydrate the chain
in Smalltalk code and free kernel of these decisions.
Maybe later.
Herby Vojčík 4 年之前
父节点
当前提交
43f3ca08b5
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 10 0
      CHANGELOG
  2. 1 1
      lang/base/kernel-runtime.js

+ 10 - 0
CHANGELOG

@@ -1,3 +1,13 @@
+11 Apr 2020 - Release 0.25.2
+===================================
+
+* Changed thisContext hydrating in kernel
+  * Set up so better stack traces are shown in debugger, esp. for async
+  * Can be breaking for code that depends on old hydration (unlikely).
+
+Commits: https://lolg.it/amber/amber/commits/0.25.2
+
+
 9 Apr 2020 - Release 0.25.1
 ===================================
 

+ 1 - 1
lang/base/kernel-runtime.js

@@ -400,7 +400,7 @@ define(['./junk-drawer'], function ($goodies) {
 
             st.getThisContext = function () {
                 if (!thisContext) return null;
-                for (var frame = thisContext; frame; frame = frame.homeContext) {
+                for (var frame = thisContext; frame; frame = frame.outerContext || frame.homeContext) {
                     frame.setup(frame);
                 }
                 return thisContext;