refactor: add CanGc as argument to Promise::resolve (#35616)

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov 2025-02-23 04:12:21 -08:00 committed by GitHub
parent adb831eefe
commit 0383ba9a5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 330 additions and 294 deletions

View file

@ -31,6 +31,7 @@ use std::rc::Rc;
use std::sync::{Arc, Weak};
use js::jsapi::JSTracer;
use script_bindings::script_runtime::CanGc;
use crate::dom::bindings::conversions::ToJSValConvertible;
use crate::dom::bindings::error::Error;
@ -151,7 +152,7 @@ impl TrustedPromise {
let this = self;
task!(resolve_promise: move || {
debug!("Resolving promise.");
this.root().resolve_native(&value);
this.root().resolve_native(&value, CanGc::note());
})
}
}