fix(runtime): clear data attributes after property delete - #10984
proggeramlug wants to merge 2 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used all 8 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe delete path now clears stored attributes for configurable properties before removal. Tests verify that deleted read-only properties can be recreated and that refused deletion preserves non-configurable descriptors. A changelog entry documents the fix. ChangesProperty deletion and recreation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Configurable deleted properties can now be recreated normally, while refused non-configurable deletes remain intact. The covered behavior is ready to merge. 🚥 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 |
|
Not in merge train 257 (#11039): the cherry-pick conflicts with current main in Worth knowing before you resolve it: that file is under a raw-handle ceiling of 2 ( |
62af46f to
c0c3c01
Compare
|
Landed on Cherry-picked from this PR's head Nothing needed from you. Thanks. |
Summary
A successful ordinary-object delete checked a data descriptor's
configurablebit, then removed the key without clearing its attribute side-table entry. A later assignment to the same name still sawwritable: falseand failed to recreate the property.Clear the attribute entry after accepting a configurable data-property delete. This happens before the tombstone or compaction path, so both paths leave the name free for a later assignment. Refused deletes still return before clearing anything.
Verification
mainbecause the read-only descriptor survived a successful delete. It now passes in both tombstone and compacting modes, with both enumerable and non-enumerable starting descriptors; it checks the recreated value andObject.keysorder.cargo test -p perry-runtime --lib delete -- --test-threads=1: 52 passed.cargo test -p perry-runtime --lib object::descriptor_state -- --test-threads=1: 11 passed.rustfmt --checkandgit diff --check: passed.Closes #10840.
Summary by CodeRabbit