mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
if thread panics then assertion for PendingLoadGuard destructor is not
run
This commit is contained in:
parent
dbb21a90d9
commit
4e327d6941
1 changed files with 4 additions and 1 deletions
|
@ -26,6 +26,7 @@ use msg::constellation_msg::{PipelineId};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||||
|
use std::thread;
|
||||||
|
|
||||||
pub mod image_cache_task;
|
pub mod image_cache_task;
|
||||||
pub mod storage_task;
|
pub mod storage_task;
|
||||||
|
@ -147,7 +148,9 @@ impl PendingLoadGuard {
|
||||||
|
|
||||||
impl Drop for PendingLoadGuard {
|
impl Drop for PendingLoadGuard {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
assert!(self.loaded)
|
if !thread::panicking() {
|
||||||
|
assert!(self.loaded)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue