Repository navigation
Preserve handler setPrototypeOf traps on scriptlet proxies - #69
Open
philipp-classen wants to merge 1 commit into
Open
philipp-classen wants to merge 1 commit into
philipp-classen wants to merge 1 commit into
Conversation
chrmod
reviewed
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first commit did not override a handler's own setPrototypeOf trap. The second commit lost that: its cycle check replaced the trap. This commit makes the trap work again.
The cycle check runs first, then the wrapper calls the handler's trap. Page scripts cannot interfere with that call.
Otherwise, something like this would have worked:
A page script trying to overwrite the prototype:
Without it, the page's version would have won, not the scriptlet's version.
For clarification: this intends to close a hole that we did not have in the beginning (on the current main branch), but would get introduce by the second commit of #67 in 026a6e8
It is not actively exploited in the wild, because the production version is not affected.