mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Rename Promise::new to Promise::new_in_current_compartment
This commit is contained in:
parent
6fa1853bb1
commit
782b58587a
25 changed files with 93 additions and 51 deletions
|
@ -110,9 +110,10 @@ impl Worklet {
|
|||
|
||||
impl WorkletMethods for Worklet {
|
||||
/// <https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule>
|
||||
#[allow(unsafe_code)]
|
||||
fn AddModule(&self, module_url: USVString, options: &WorkletOptions) -> Rc<Promise> {
|
||||
// Step 1.
|
||||
let promise = Promise::new(self.window.upcast());
|
||||
let promise = unsafe { Promise::new_in_current_compartment(self.window.upcast()) };
|
||||
|
||||
// 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