Skip to content

Replace CanGc::note() calls with arguments passed by callers #33683

@jdm

Description

@jdm

There are a lot of CanGc::note() calls in components/script: https://github.com/search?q=repo%3Aservo%2Fservo%20CanGc%3A%3Anote&type=code

This was introduced in #33144, but in general any use of CanGc::note() is an opportunity to make the code more precise by adding a CanGc argument that is passed by the caller instead (see #33386 for an example). This is a task that will take a very, very long time to do all at once, so it's fine to just focus on one caller at a time and propagate it upwards until it becomes too much work!

If you want to work on this task, just leave a comment linking to the specific call sites that you are going to focus on.

There is no need to write or run tests for changes related to this issue; it is strictly about making garbage collection hazards more visible when reading code, and if the code compiles then everything works!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/scriptRelated to the script threadB-metaThis issue tracks the status of multiple, related pieces of workE-less-complexStraightforward. Recommended for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions