mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Replace panic with warn in DocumentLoader.finish_load.
Fix panic on broken script URL with an onerror handler that rewrites the document.
This commit is contained in:
parent
dd2deeabca
commit
211fb00574
1 changed files with 6 additions and 2 deletions
|
@ -167,8 +167,12 @@ impl DocumentLoader {
|
||||||
.blocking_loads
|
.blocking_loads
|
||||||
.iter()
|
.iter()
|
||||||
.position(|unfinished| *unfinished == *load);
|
.position(|unfinished| *unfinished == *load);
|
||||||
self.blocking_loads
|
match idx {
|
||||||
.remove(idx.unwrap_or_else(|| panic!("unknown completed load {:?}", load)));
|
Some(i) => {
|
||||||
|
self.blocking_loads.remove(i);
|
||||||
|
},
|
||||||
|
None => warn!("unknown completed load {:?}", load),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_blocked(&self) -> bool {
|
pub fn is_blocked(&self) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue