mirror of
https://github.com/servo/servo
synced 2026-05-08 16:12:15 +02:00
Companion to https://github.com/servo/mozjs/pull/650 We added 3 new options to bindings.conf, each more powerful then the previous one, so one should use the least powerful as possible to keep things flexible: 1 `cx_no_gc` prepends argument `&JSContext`, which allows creating NoGC tokens and using functions that do not trigger GC. 2. `cx` prepends argument `&mut JSContext`, which allows everything that previous one allows, but it also allows calling GC triggering functions. 3. `realm` prepends argument `&mut CurrentRealm`, which can be deref_mut to `&mut JSContext` (so it can do everything that previous can), but it also ensures that there is current entered realm, which can be used for creation of InRealm. next steps: #40600 reviewable per commit Testing: It's just refactoring try run: https://github.com/sagudev/servo/actions/runs/19287700927 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>