소스 검색

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;