diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-10-11 13:53:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 13:53:01 -0500 |
commit | 882b22b6068826f49e8279910784db8b3ebb61f0 (patch) | |
tree | 3516f1bfa7ed89ae779be858b6e01d06247dd573 | |
parent | 105c5d2a0692c6e09320c5d967b43f879c3cd00d (diff) | |
parent | c9b5ffb58691dc30e370a989dd0a23aad6b26a4a (diff) | |
download | servo-882b22b6068826f49e8279910784db8b3ebb61f0.tar.gz servo-882b22b6068826f49e8279910784db8b3ebb61f0.zip |
Auto merge of #18829 - bholley:verify_in_drop, r=Manishearth
Verify in DiagnosticHashMap::drop
This will let us reason better about the drop_in_place crashes.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18829)
<!-- Reviewable:end -->
-rw-r--r-- | components/hashglobe/src/diagnostic.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/hashglobe/src/diagnostic.rs b/components/hashglobe/src/diagnostic.rs index 05a044b0246..0c4df266b34 100644 --- a/components/hashglobe/src/diagnostic.rs +++ b/components/hashglobe/src/diagnostic.rs @@ -209,7 +209,9 @@ impl<K: Hash + Eq, V, S: BuildHasher> Drop for DiagnosticHashMap<K, V, S> S: BuildHasher { fn drop(&mut self) { + self.map.verify(); debug_assert!(self.readonly, "Dropped while mutating"); + self.verify(); } } |