mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update servo-media. Remove implicit shutdown requests. It all happens automagicly now
This commit is contained in:
parent
3658a8cc59
commit
507a1e4370
4 changed files with 53 additions and 38 deletions
|
@ -83,7 +83,6 @@ pub struct BaseAudioContext {
|
|||
eventtarget: EventTarget,
|
||||
#[ignore_malloc_size_of = "servo_media"]
|
||||
audio_context_impl: Arc<Mutex<AudioContext>>,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-destination
|
||||
destination: MutNullableDom<AudioDestinationNode>,
|
||||
listener: MutNullableDom<AudioListener>,
|
||||
|
@ -128,7 +127,6 @@ impl BaseAudioContext {
|
|||
audio_context_impl: ServoMedia::get()
|
||||
.unwrap()
|
||||
.create_audio_context(&client_context_id, options.into()),
|
||||
browsing_context_id,
|
||||
destination: Default::default(),
|
||||
listener: Default::default(),
|
||||
in_flight_resume_promises_queue: Default::default(),
|
||||
|
@ -555,18 +553,6 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
}
|
||||
}
|
||||
|
||||
impl Drop for BaseAudioContext {
|
||||
fn drop(&mut self) {
|
||||
let client_context_id = ClientContextId::build(
|
||||
self.browsing_context_id.namespace_id.0,
|
||||
self.browsing_context_id.index.0.get(),
|
||||
);
|
||||
ServoMedia::get()
|
||||
.unwrap()
|
||||
.shutdown_audio_context(&client_context_id, self.audio_context_impl.clone());
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BaseAudioContextOptions> for AudioContextOptions {
|
||||
fn from(options: BaseAudioContextOptions) -> Self {
|
||||
match options {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue