aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/document_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/document_loader.rs')
-rw-r--r--components/script/document_loader.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/components/script/document_loader.rs b/components/script/document_loader.rs
index d127d78ebd2..ef4075d6599 100644
--- a/components/script/document_loader.rs
+++ b/components/script/document_loader.rs
@@ -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 {