mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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
|
@ -49,7 +49,7 @@ use crate::dom::workletglobalscope::{
|
|||
};
|
||||
use crate::fetch::load_whole_resource;
|
||||
use crate::realms::InRealm;
|
||||
use crate::script_runtime::{CommonScriptMsg, Runtime, ScriptThreadEventCategory};
|
||||
use crate::script_runtime::{CanGc, CommonScriptMsg, Runtime, ScriptThreadEventCategory};
|
||||
use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
|
||||
use crate::task::TaskBox;
|
||||
use crate::task_source::TaskSourceName;
|
||||
|
@ -123,9 +123,10 @@ impl WorkletMethods for Worklet {
|
|||
module_url: USVString,
|
||||
options: &WorkletOptions,
|
||||
comp: InRealm,
|
||||
can_gc: CanGc,
|
||||
) -> Rc<Promise> {
|
||||
// Step 1.
|
||||
let promise = Promise::new_in_current_realm(comp);
|
||||
let promise = Promise::new_in_current_realm(comp, can_gc);
|
||||
|
||||
// Step 3.
|
||||
let module_url_record = match self.window.Document().base_url().join(&module_url.0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue