script: Replace uses of RootedVec<JSVal> with Rooted<Vec<JSVal>>.#41921
Merged
jdm merged 4 commits intoservo:mainfrom Jan 22, 2026
Merged
script: Replace uses of RootedVec<JSVal> with Rooted<Vec<JSVal>>.#41921jdm merged 4 commits intoservo:mainfrom
RootedVec<JSVal> with Rooted<Vec<JSVal>>.#41921jdm merged 4 commits intoservo:mainfrom
Conversation
Member
Author
|
FYI @Taym95 |
github-merge-queue bot
pushed a commit
to servo/mozjs
that referenced
this pull request
Jan 18, 2026
We created our `RootedVec` type back before we supported storing arbitrary traceable types in SpiderMonkey's `Rooted` class. Now that we can do that, we can replicate SpiderMonkey's `RootedVec`, which is just a Rooted wrapper around a vector. Testing: New unit test added. Servo PR: servo/servo#41921 --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Member
|
mozjs bump is here: #41971, so this PR should land after it. |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
sagudev
approved these changes
Jan 19, 2026
Taym95
approved these changes
Jan 19, 2026
…ent list. Signed-off-by: Josh Matthews <josh@joshmatthews.net>
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.
This replaces uses of our custom RootedVec type that were storing JS GC values with stack rooting that is better integrated with the engine. This ensures that storing nursery-allocated objects in these vectors is handled correctly during GC, unlike our RootedVec implementation which trips an assertion in debug mozjs builds.
Testing: No observable difference in non-mozjs builds.
Fixes: part of #40141