Skip to content

Start exposing realm requirements in JS API wrappers. - #841

Open
jdm wants to merge 1 commit into
servo:mainfrom
jdm:more-realms
Open

jdm wants to merge 1 commit into
servo:mainfrom
jdm:more-realms

Conversation

@jdm

@jdm jdm commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Unlike whether a function can GC, information about whether an API method requires a realm to be active does not appear to be statically available or inferrable. Here are some annotations for a few public API methods that use constructs like cx->compartment()->... or cx->realm()->... without explicitly entering a realm and therefore require that the caller has already done so.

Testing: Relevant unit tests were updated.
Servo PR: servo/servo#49371

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
or "GetJobQueue" in sig
):
sig = sig.replace("&mut JSContext", "&JSContext")
if (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just write the some explanatory comment here why they are here and how were they obtained. I should've written docs for no_gc.

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.

2 participants