fix: clone environment correctly
This commit is contained in:
parent
5fc5eb08f8
commit
d8e46c3149
@ -192,7 +192,7 @@ public class SimpleDebugger implements Debugger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ObjRef(Context ctx, ObjectValue obj) {
|
public ObjRef(Context ctx, ObjectValue obj) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx.environment.context();
|
||||||
this.obj = obj;
|
this.obj = obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -349,8 +349,7 @@ public class SimpleDebugger implements Debugger {
|
|||||||
}
|
}
|
||||||
private JSONMap serializeObj(Context ctx, Object val, boolean byValue) {
|
private JSONMap serializeObj(Context ctx, Object val, boolean byValue) {
|
||||||
val = Values.normalize(null, val);
|
val = Values.normalize(null, val);
|
||||||
var newEnv = new Environment();
|
var newEnv = ctx.environment.child();
|
||||||
newEnv.addAll(ctx);
|
|
||||||
newEnv.add(DebugContext.IGNORE);
|
newEnv.add(DebugContext.IGNORE);
|
||||||
ctx = newEnv.context();
|
ctx = newEnv.context();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user