Skip to content

RemovableDomEventListener contains a Trusted member #40631

@jdm

Description

@jdm

https://github.com/servo/servo/blob/cae6350af7c734444ddd4a238f2c47d70cecc3c5/components/script/dom/abortsignal.rs#L60C19-L61

Trusted<T> is intended to be used as a handle inside of async tasks or inter-thread operations. I see no evidence that the RemovableDomEventListener type is used for either of those; we should be able to store a Dom<EventTarget> value instead and add #[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)] to the struct to allow ./mach build --use-crown to succeed.

There should be no difference in behaviour when running ./mach test-wpt tests/wpt/tests/dom/abort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domInteracting with the DOM from web contentE-less-complexStraightforward. Recommended for a new contributor.I-cleanupNo impact; the issue is one of maintainability or tidiness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions