mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00: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
|
||||
.iter()
|
||||
.position(|unfinished| *unfinished == *load);
|
||||
self.blocking_loads
|
||||
.remove(idx.unwrap_or_else(|| panic!("unknown completed load {:?}", load)));
|
||||
match idx {
|
||||
Some(i) => {
|
||||
self.blocking_loads.remove(i);
|
||||
},
|
||||
None => warn!("unknown completed load {:?}", load),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_blocked(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue