Skip to content

HTMLMediaElement::Seekable needs a CanGc argument #39944

@jdm

Description

@jdm

Instead of using CanGc::note() in

TimeRanges::new(self.global().as_window(), seekable, CanGc::note())
, we should make it a method argument via
'canGc': ['Load', 'Pause', 'Play', 'SetSrcObject', 'SetCrossOrigin'],
.

This matters because it's called from

let seekable = self.Seekable();
and we keep writing code that calls self.seek(..) within a borrow_mut(), which can trigger a panic if a GC occurs. We need to chain the CanGc arguments as far up the stack as possible!

No need to run any tests; if it compiles, that's good enough for a PR.

Metadata

Metadata

Assignees

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