Replace CanGC note calls with arguments passed by callers (#33978)

Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
Co-authored-by: Wulan Seruniati Salim <lauwwulan1806@gmail.com>
This commit is contained in:
Wulan Seruniati Salim 2024-10-24 05:19:20 +07:00 committed by GitHub
parent 9d75862c7d
commit 3ed778150f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -708,7 +708,7 @@ impl Callback for ConsumeBodyPromiseHandler {
let realm = enter_realm(&*global); let realm = enter_realm(&*global);
let comp = InRealm::Entered(&realm); let comp = InRealm::Entered(&realm);
read_promise.append_native_handler(&handler, comp, CanGc::note()); read_promise.append_native_handler(&handler, comp, can_gc);
} }
} }
} }

View file

@ -2280,7 +2280,7 @@ impl Window {
load_data.url.clone(), load_data.url.clone(),
replace, replace,
)); ));
doc.check_and_scroll_fragment(fragment, CanGc::note()); doc.check_and_scroll_fragment(fragment, can_gc);
let this = Trusted::new(self); let this = Trusted::new(self);
let old_url = doc.url().into_string(); let old_url = doc.url().into_string();
let new_url = load_data.url.clone().into_string(); let new_url = load_data.url.clone().into_string();

View file

@ -600,7 +600,7 @@ impl XRSession {
} }
/// <https://www.w3.org/TR/webxr/#apply-the-nominal-frame-rate> /// <https://www.w3.org/TR/webxr/#apply-the-nominal-frame-rate>
fn apply_nominal_framerate(&self, rate: f32) { fn apply_nominal_framerate(&self, rate: f32, can_gc: CanGc) {
if self.framerate.get() == rate || self.ended.get() { if self.framerate.get() == rate || self.ended.get() {
return; return;
} }
@ -613,7 +613,7 @@ impl XRSession {
false, false,
false, false,
self, self,
CanGc::note(), can_gc,
); );
event.upcast::<Event>().fire(self.upcast()); event.upcast::<Event>().fire(self.upcast());
} }
@ -1067,7 +1067,7 @@ impl XRSessionMethods for XRSession {
let _ = task_source.queue_with_canceller( let _ = task_source.queue_with_canceller(
task!(update_session_framerate: move || { task!(update_session_framerate: move || {
let session = this.root(); let session = this.root();
session.apply_nominal_framerate(message.unwrap()); session.apply_nominal_framerate(message.unwrap(), CanGc::note());
if let Some(promise) = session.update_framerate_promise.borrow_mut().take() { if let Some(promise) = session.update_framerate_promise.borrow_mut().take() {
promise.resolve_native(&()); promise.resolve_native(&());
}; };