fix(runtime): honor inherited descriptors when filling array holes - #9797
fix(runtime): honor inherited descriptors when filling array holes#9797proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe array hole numeric-store fast path now detects indexed descriptors on default prototypes and falls back to the general ChangesArray hole write semantics
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Array writes into holes now honor inherited indexed setters and read-only descriptors rather than creating incorrect own elements. The intended behavior and relevant descriptor cases are covered, with no concrete current-head merge risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
|
Landed on |
Closes #9787.
A numeric assignment into an in-bounds array hole could create an own element instead of invoking an inherited setter. The issue's fixture installs one accessor: its out-of-bounds write works, while the subsequent
new Array(5)[3] = 37bypasses it.Use the existing array-index invalidation byte in the runtime's numeric store fast path. It covers indexed properties on
Array.prototypeandObject.prototype, as well as custom array prototypes. Unmodified prototype chains still take the one-load fast path, and existing own elements continue to bypass inherited descriptors.Regression coverage includes new and deleted holes, an own
undefinedvalue, removal of the inherited accessor, and Object.prototype setters/getter-only/read-only properties. Both new fixtures fail on the original runtime and their expected output was verified with Node.Validation:
scripts/pre-tag-check.sh --quickpassed.scripts/test_affected_crates.sh --base origin/main: runtime suite passed; CLI had 1,083 passes and the existingPERRY_CONCAT_SITE_CACHEcache-audit failure addressed separately by fix(cache): register concat switch and explain codegen inputs #9748.No version bump.
Summary by CodeRabbit
Bug Fixes
Array.prototypeandObject.prototype, including appropriate errors for getter-only and non-writable properties.Tests