fix(windows): keep WinUI callbacks behind scanned keys - #8764
fix(windows): keep WinUI callbacks behind scanned keys#8764proggeramlug wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughWinUI lifecycle, timer, and widget callbacks now use GC-scanned slots and stable keys. Invocation resolves the current callback instead of using raw pointers captured by Reactor closures. Tests cover rewritten application and widget callback slots. ChangesWinUI callback indirection
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The PR confines WinUI and timer callbacks to GC-scanned indirection tables and adds Windows regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
71f3d88 to
68b2d6c
Compare
Resolve widget, lifecycle, and timer callback pointers from GC-scanned storage at invocation time so Reactor closures cannot retain stale addresses after an evacuating collection.\n\nFixes #8734
68b2d6c to
e9e4813
Compare
Summary
NODEStable and have Reactor handlers resolve them by widget handle and callback slot at invocationRelated issue
Fixes #8734
Test plan
cargo fmt -p perry-ui-windows-winui -- --checkcargo check -p perry-ui-windows-winui --all-targetscargo build --release -p perry-ui-windows-winui$env:RUSTFLAGS = '-C link-arg=/FORCE:MULTIPLE'; cargo test -p perry-ui-windows-winui --lib reactor_callback_keys(2 passed)python scripts/workspace_architecture.py --check --print-summarygit diff --checkNotes
The focused tests use
/FORCE:MULTIPLElocally because ordinary Windows lib-test linking currently encounters pre-existing duplicateperry_audio_*exports betweenperry-ui-windowsandperry-audio-miniaudio(LNK2005). Clippy is also blocked before reaching this crate by the existing mistyped0x0071_7263_i64suffix inperry-ui-windows/src/widgets/qrcode.rs. Package formatting, all-target checking, the release build, and the focused regression tests pass.Summary by CodeRabbit