mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
fix invalid video poster image loading from panicking (#31447)
This fixed #31438. When an image is loaded from cache, it will load a placeholder if the url is not a valid image url. This may be unexpected when using the image cache and specifying UsePlaceholder::No but that has no effect on loading an image not in the cache. Signed-off-by: Sebastian C <sebsebmc@gmail.com>
This commit is contained in:
parent
e2e30bcbb1
commit
51b3313854
1 changed files with 2 additions and 2 deletions
|
@ -302,8 +302,8 @@ impl ImageCacheListener for HTMLVideoElement {
|
||||||
LoadBlocker::terminate(&mut *self.load_blocker.borrow_mut());
|
LoadBlocker::terminate(&mut *self.load_blocker.borrow_mut());
|
||||||
},
|
},
|
||||||
ImageResponse::MetadataLoaded(..) => {},
|
ImageResponse::MetadataLoaded(..) => {},
|
||||||
ImageResponse::PlaceholderLoaded(..) => unreachable!(),
|
// The image cache may have loaded a placeholder for an invalid poster url
|
||||||
ImageResponse::None => {
|
ImageResponse::PlaceholderLoaded(..) | ImageResponse::None => {
|
||||||
// A failed load should unblock the document load.
|
// A failed load should unblock the document load.
|
||||||
LoadBlocker::terminate(&mut *self.load_blocker.borrow_mut());
|
LoadBlocker::terminate(&mut *self.load_blocker.borrow_mut());
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue