aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webxr/xrsystem.rs
diff options
context:
space:
mode:
authorYerkebulan Tulibergenov <yerkebulan@gmail.com>2025-02-25 02:12:58 -0800
committerGitHub <noreply@github.com>2025-02-25 10:12:58 +0000
commit38b71087bd710dd0a96140affbb5bb38c23d8689 (patch)
tree62f64087a4ef2e508b8ce0679391799ac91a34d1 /components/script/dom/webxr/xrsystem.rs
parentc844ed232a86fef873dc661de60e282fdb86c0d3 (diff)
downloadservo-38b71087bd710dd0a96140affbb5bb38c23d8689.tar.gz
servo-38b71087bd710dd0a96140affbb5bb38c23d8689.zip
refactor: add CanGc as argument to Promise::reject_error (#35646)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
Diffstat (limited to 'components/script/dom/webxr/xrsystem.rs')
-rw-r--r--components/script/dom/webxr/xrsystem.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/webxr/xrsystem.rs b/components/script/dom/webxr/xrsystem.rs
index cda1315e528..288a81e0649 100644
--- a/components/script/dom/webxr/xrsystem.rs
+++ b/components/script/dom/webxr/xrsystem.rs
@@ -171,13 +171,13 @@ impl XRSystemMethods<crate::DomTypeHolder> for XRSystem {
if pref!(dom_webxr_unsafe_assume_user_intent) {
warn!("The dom.webxr.unsafe-assume-user-intent preference assumes user intent to enter WebXR.");
} else {
- promise.reject_error(Error::Security);
+ promise.reject_error(Error::Security, can_gc);
return promise;
}
}
if self.pending_or_active_session() {
- promise.reject_error(Error::InvalidState);
+ promise.reject_error(Error::InvalidState, can_gc);
return promise;
}
@@ -200,7 +200,7 @@ impl XRSystemMethods<crate::DomTypeHolder> for XRSystem {
if mode != XRSessionMode::Inline {
self.pending_immersive_session.set(false);
}
- promise.reject_error(Error::NotSupported);
+ promise.reject_error(Error::NotSupported, can_gc);
return promise;
}
}
@@ -291,7 +291,7 @@ impl XRSystem {
if mode != XRSessionMode::Inline {
self.pending_immersive_session.set(false);
}
- promise.reject_error(Error::NotSupported);
+ promise.reject_error(Error::NotSupported, can_gc);
return;
},
};