fix/scope-parent-cycle #92

Merged
sergeych merged 2 commits from fix/scope-parent-cycle into master 2025-12-11 03:09:45 +03:00

2 Commits

Author SHA1 Message Date
fd473a32d8 refine some tests 2025-12-11 00:55:05 +01:00
d15dfb6087 core: prevent scope parent-chain cycles when reusing pooled frames
- Scope.resetForReuse: fully detach before re-parenting (clear state, parent=null, new frameId), then validate with ensureNoCycle and assign parent/args/pos/thisObj
- ScopePool.borrow (JVM/Android/JS/Native/Wasm): defensive fallback to fresh Scope allocation if resetForReuse detects a cycle
- docs: add docs/fix-scope-parent-cycle.md describing the change and expectations
- test: add ScopeCycleRegressionTest to ensure instance method call pattern does not crash and returns "ok"
2025-12-11 00:50:46 +01:00