mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Cancel fetch in some media data processing steps
This commit is contained in:
parent
b656ae195f
commit
da0e92d7f8
1 changed files with 6 additions and 3 deletions
|
@ -1193,9 +1193,9 @@ impl FetchResponseListener for HTMLMediaElementContext {
|
|||
// Ensure that the element doesn't receive any further notifications
|
||||
// of the aborted fetch.
|
||||
self.ignore_response = true;
|
||||
self.elem
|
||||
.root()
|
||||
.queue_dedicated_media_source_failure_steps();
|
||||
let elem = self.elem.root();
|
||||
elem.fetch_canceller.borrow_mut().cancel();
|
||||
elem.queue_dedicated_media_source_failure_steps();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1264,6 +1264,9 @@ impl FetchResponseListener for HTMLMediaElementContext {
|
|||
}
|
||||
// => "If the connection is interrupted after some media data has been received..."
|
||||
else if elem.ready_state.get() != ReadyState::HaveNothing {
|
||||
// Step 1
|
||||
elem.fetch_canceller.borrow_mut().cancel();
|
||||
|
||||
// Step 2
|
||||
elem.error.set(Some(&*MediaError::new(
|
||||
&*window_from_node(&*elem),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue