script: Update mozjs to include with more safe wrappers and debugmozjs artifacts#41971
Merged
jdm merged 1 commit intoservo:mainfrom Jan 18, 2026
Merged
script: Update mozjs to include with more safe wrappers and debugmozjs artifacts#41971jdm merged 1 commit intoservo:mainfrom
jdm merged 1 commit intoservo:mainfrom
Conversation
github-merge-queue bot
pushed a commit
to servo/mozjs
that referenced
this pull request
Jan 17, 2026
Firstly we simplify `NoGC` to be proper ZST without any inner lifetime. One should now use `no_gc: &NoGC` (this gives us compiler reborrow support, instead of manual reborrows we need to do for handles). This allows us to impl deref from `&JSContext` so `&JSContext` and `&NoGC` can be used interchangeably. Then we add `as_ref` and `as_mut_ref` as the safe way (as they require `&NoGC`, aliasing rules are uphold by &/&mut of handles/root) of obtaining reference to rooted value. This should eventually replace unsound derefs and unsafe as_mut, but until then documentation notice will suffice. Testing: compile doc tests Servo PR: servo/servo#41971 This is not reviewable per commit. --------- Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
e104849 to
ca829fc
Compare
jdm
approved these changes
Jan 18, 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.
This bump includes
some new safe wrappers: servo/mozjs#699 servo/mozjs#700
debugmozjs artifacts: servo/mozjs#544
rooted macros with vectors: servo/mozjs#697
Testing: Done in mozjs repo.