mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #24000 - ferjm:update.servo.media.shutdown, r=jdm
Update servo-media. Remove implicit shutdown requests. It all happens… … automagicly now - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24000) <!-- Reviewable:end -->
This commit is contained in:
commit
4f4c2be144
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 {
|
||||
|
|
|
@ -1855,16 +1855,6 @@ impl Drop for HTMLMediaElement {
|
|||
}
|
||||
});
|
||||
|
||||
if let Some(ref player) = *self.player.borrow() {
|
||||
let browsing_context_id = window.window_proxy().top_level_browsing_context_id().0;
|
||||
let client_context_id = ClientContextId::build(
|
||||
browsing_context_id.namespace_id.0,
|
||||
browsing_context_id.index.0.get(),
|
||||
);
|
||||
ServoMedia::get()
|
||||
.unwrap()
|
||||
.shutdown_player(&client_context_id, player.clone());
|
||||
}
|
||||
self.remove_controls();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue