Skip to content

Fix serializing proto key#7

Merged
Sytten merged 1 commit into
rquickjs:mainfrom
jeffcharles:jc.fix-proto-keys
Jun 8, 2026
Merged

Fix serializing proto key#7
Sytten merged 1 commit into
rquickjs:mainfrom
jeffcharles:jc.fix-proto-keys

Conversation

@jeffcharles

Copy link
Copy Markdown
Collaborator

When updating Javy, our tests noticed a bug with serialization. Our tests noticed an issue with JSON.parse('{"__proto__":[]}'). The existing code is doing the equivalent of obj["__proto__"] = [] which sets obj's prototype to an array whereas it should remain as Object.prototype. This fix ensures an own property called __proto__ is defined with value instead of calling the prototype setter.

@Sytten

Sytten commented Jun 8, 2026

Copy link
Copy Markdown
Member

Ha yes I just checked the PR and I failed to catch that regression. Thanks for the fix!

@Sytten Sytten merged commit 5581ebc into rquickjs:main Jun 8, 2026
1 check passed
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.

2 participants