refactor: propagate CanGc arguments through callers (#35591)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-23 01:34:51 +01:00 committed by GitHub
parent 02199520f2
commit b0b0289014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 403 additions and 275 deletions

View file

@ -235,13 +235,13 @@ pub(crate) struct XMLHttpRequest {
}
impl XMLHttpRequest {
fn new_inherited(global: &GlobalScope) -> XMLHttpRequest {
fn new_inherited(global: &GlobalScope, can_gc: CanGc) -> XMLHttpRequest {
XMLHttpRequest {
eventtarget: XMLHttpRequestEventTarget::new_inherited(),
ready_state: Cell::new(XMLHttpRequestState::Unsent),
timeout: Cell::new(Duration::ZERO),
with_credentials: Cell::new(false),
upload: Dom::from_ref(&*XMLHttpRequestUpload::new(global, CanGc::note())),
upload: Dom::from_ref(&*XMLHttpRequestUpload::new(global, can_gc)),
response_url: DomRefCell::new(String::new()),
status: DomRefCell::new(HttpStatus::new_error()),
response: DomRefCell::new(vec![]),
@ -278,7 +278,7 @@ impl XMLHttpRequest {
can_gc: CanGc,
) -> DomRoot<XMLHttpRequest> {
reflect_dom_object_with_proto(
Box::new(XMLHttpRequest::new_inherited(global)),
Box::new(XMLHttpRequest::new_inherited(global, can_gc)),
global,
proto,
can_gc,