-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Port CanGC/InRealm methods to use &mut JSContext/CurrentRealm #42638
Copy link
Copy link
Open
Labels
B-metaThis issue tracks the status of multiple, related pieces of workThis issue tracks the status of multiple, related pieces of workE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.
Metadata
Metadata
Assignees
Labels
B-metaThis issue tracks the status of multiple, related pieces of workThis issue tracks the status of multiple, related pieces of workE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.
Type
Fields
Give feedbackNo fields configured for Task.
In bindings.conf each "dom method" (the ones that are exposed in JS), have entries like this:
servo/components/script_bindings/codegen/Bindings.conf
Lines 152 to 155 in 2eeaf05
that adds the type (
CanGcorInRealm) to method.To port to new model, we need to switch:
InRealmto&mut CurrentRealmlike done in this commit: 0132fc0CanGcto&mut JSContextlike done in this commit: 36e5b32Full demonstration PR is here: #42637
More complete migration instruction: https://gist.github.com/sagudev/839382e70631b1eaed5a4d226b830b6e
TASK: Select one file and port some methods, but please claim the file beforehand by writing a comment in this issue. If methods are used in other files feel free to skip them or make sure their users also get
&mut JSContext(this is more advanced).