aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/net_traits/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index d2ecae532be..afbb6d0b5c8 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -26,6 +26,7 @@ use msg::constellation_msg::{PipelineId};
use url::Url;
use std::sync::mpsc::{channel, Receiver, Sender};
+use std::thread;
pub mod image_cache_task;
pub mod storage_task;
@@ -147,7 +148,9 @@ impl PendingLoadGuard {
impl Drop for PendingLoadGuard {
fn drop(&mut self) {
- assert!(self.loaded)
+ if !thread::panicking() {
+ assert!(self.loaded)
+ }
}
}