Skip to content

script: Update mozjs to include with more safe wrappers and debugmozjs artifacts#41971

Merged
jdm merged 1 commit intoservo:mainfrom
sagudev:safe-handles-companion
Jan 18, 2026
Merged

script: Update mozjs to include with more safe wrappers and debugmozjs artifacts#41971
jdm merged 1 commit intoservo:mainfrom
sagudev:safe-handles-companion

Conversation

@sagudev
Copy link
Copy Markdown
Member

@sagudev sagudev commented Jan 17, 2026

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.

@mrobinson mrobinson changed the title script: Update mozjs script: Update mozjs to include servo/mozjs#700 Jan 17, 2026
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]>
@sagudev sagudev changed the title script: Update mozjs to include servo/mozjs#700 script: Update mozjs to include with more safe wrappers and debugmozjs artifacts Jan 18, 2026
t
Signed-off-by: sagudev <[email protected]>
@sagudev sagudev force-pushed the safe-handles-companion branch from e104849 to ca829fc Compare January 18, 2026 10:54
@sagudev sagudev marked this pull request as ready for review January 18, 2026 10:54
@sagudev sagudev requested a review from gterzian as a code owner January 18, 2026 10:54
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 18, 2026
@sagudev sagudev requested review from jdm and removed request for gterzian January 18, 2026 13:39
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 18, 2026
@jdm jdm added this pull request to the merge queue Jan 18, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 18, 2026
Merged via the queue into servo:main with commit 4b71136 Jan 18, 2026
33 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 18, 2026
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.

3 participants