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
|
@ -113,8 +113,9 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
|
|||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-startrendering
|
||||
#[allow(unsafe_code)]
|
||||
fn StartRendering(&self) -> Rc<Promise> {
|
||||
let promise = Promise::new(&self.global());
|
||||
let promise = unsafe { Promise::new_in_current_compartment(&self.global()) };
|
||||
if self.rendering_started.get() {
|
||||
promise.reject_error(Error::InvalidState);
|
||||
return promise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue