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
|
@ -87,6 +87,7 @@ impl Permissions {
|
|||
// https://w3c.github.io/permissions/#dom-permissions-query
|
||||
// https://w3c.github.io/permissions/#dom-permissions-request
|
||||
// https://w3c.github.io/permissions/#dom-permissions-revoke
|
||||
#[allow(unsafe_code)]
|
||||
fn manipulate(
|
||||
&self,
|
||||
op: Operation,
|
||||
|
@ -97,7 +98,7 @@ impl Permissions {
|
|||
// (Query, Request) Step 3.
|
||||
let p = match promise {
|
||||
Some(promise) => promise,
|
||||
None => Promise::new(&self.global()),
|
||||
None => unsafe { Promise::new_in_current_compartment(&self.global()) },
|
||||
};
|
||||
|
||||
// (Query, Request, Revoke) Step 1.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue