Auto merge of #6162 - r0e:testing, r=jdm

Fixes issue #6148 

@jdm After mulling over this for a little while, i'm not sure if this approach is correct. Any comments?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6162)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-05-25 16:33:43 -05:00
commit 6595ebed0f

View file

@ -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)
}
}
}