Skip to content

fix: invalidate unique shape when property attributes change in place - #5720

Open
Beehtrix wants to merge 1 commit into
boa-dev:mainfrom
Beehtrix:fix/freeze-invalidates-cached-shape-5706
Open

Beehtrix wants to merge 1 commit into
boa-dev:mainfrom
Beehtrix:fix/freeze-invalidates-cached-shape-5706

Conversation

@Beehtrix

@Beehtrix Beehtrix commented Dec 3, 2026

Copy link
Copy Markdown

This Pull Request fixes/closes #5706.

It changes the following:

  • When a property's attributes change in place on a unique shape (for example Object.freeze clearing writable), a new UniqueShape is created instead of reusing the old one, so inline caches keyed on the old shape are invalidated.
  • Before this, a write that had already been cached kept succeeding after the object was frozen instead of throwing a TypeError in strict mode.
  • Adds the regression test freeze_invalidates_cached_unique_shape_write. It fails before the change and passes after it.

@Beehtrix
Beehtrix requested a review from a team as a code owner December 3, 2026 07:36
Copilot AI lite review requested due to automatic review settings December 3, 2026 07:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cached write overwrites frozen Object.prototype property without throwing

2 participants