Skip to content
Permalink
Browse files

Update servo-media. Remove implicit shutdown requests. It all happens…

… automagicly now
  • Loading branch information...
ferjm committed Aug 19, 2019
1 parent 3658a8c commit 507a1e4370c3f626c686f63d4b64c1686e73adbd
Showing with 53 additions and 38 deletions.
  1. +49 −14 Cargo.lock
  2. +0 −14 components/script/dom/baseaudiocontext.rs
  3. +0 −10 components/script/dom/htmlmediaelement.rs
  4. +4 −0 servo-tidy.toml

Some generated files are not rendered by default. Learn more.

@@ -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();
}
}
@@ -46,9 +46,13 @@ packages = [
"parking_lot",
"parking_lot_core",
"percent-encoding", # https://github.com/servo/servo/pull/23838
"proc-macro2",
"quote",
"rand_core",
"scopeguard",
"syn",
"unicase",
"unicode-xid",
"url", # https://github.com/servo/servo/pull/23838
"ws",
]

0 comments on commit 507a1e4

Please sign in to comment.
You can’t perform that action at this time.