mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Mark promise creation methods with CanGc (#33928)
* Add CanGc annotations to promise constructor. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc arguments for Promise::new_in_current_realm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix out-of-order entries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from Promise::new. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Suppress clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
edc304854f
commit
575e885529
50 changed files with 422 additions and 221 deletions
|
@ -33,6 +33,7 @@ use crate::dom::bindings::root::DomRoot;
|
|||
use crate::dom::fakexrinputcontroller::{init_to_mock_buttons, FakeXRInputController};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::script_runtime::CanGc;
|
||||
use crate::task_source::TaskSource;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -297,9 +298,9 @@ impl FakeXRDeviceMethods for FakeXRDevice {
|
|||
}
|
||||
|
||||
/// <https://immersive-web.github.io/webxr-test-api/#dom-fakexrdevice-disconnect>
|
||||
fn Disconnect(&self) -> Rc<Promise> {
|
||||
fn Disconnect(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
let global = self.global();
|
||||
let p = Promise::new(&global);
|
||||
let p = Promise::new(&global, can_gc);
|
||||
let mut trusted = Some(TrustedPromise::new(p.clone()));
|
||||
let (task_source, canceller) = global
|
||||
.as_window()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue