diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-07-12 16:48:19 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-07-14 11:01:07 +0200 |
commit | 6597178b91632e40d5f6dc2d80c1714445841b6a (patch) | |
tree | 6848b8d424b1ff36690d645d6a3ba40c34508eb2 /components/servo_arc/lib.rs | |
parent | af36ce2ae1d93c9ca30cf0c5f3ac726ae9ce5278 (diff) | |
download | servo-6597178b91632e40d5f6dc2d80c1714445841b6a.tar.gz servo-6597178b91632e40d5f6dc2d80c1714445841b6a.zip |
Auto merge of #17701 - bholley:reuse_allocations, r=emilio
reuse the bloom filter and style sharing cache across traversals
https://bugzilla.mozilla.org/show_bug.cgi?id=1380198
<!-- 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/17701)
<!-- Reviewable:end -->
Diffstat (limited to 'components/servo_arc/lib.rs')
-rw-r--r-- | components/servo_arc/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs index 0040fdea6d1..ff4074767f8 100644 --- a/components/servo_arc/lib.rs +++ b/components/servo_arc/lib.rs @@ -22,14 +22,16 @@ // duplicate those here. #![allow(missing_docs)] -#[cfg(feature = "servo")] extern crate serde; extern crate nodrop; +#[cfg(feature = "servo")] extern crate serde; +extern crate stable_deref_trait; #[cfg(feature = "servo")] use heapsize::HeapSizeOf; use nodrop::NoDrop; #[cfg(feature = "servo")] use serde::{Deserialize, Serialize}; +use stable_deref_trait::{CloneStableDeref, StableDeref}; use std::{isize, usize}; use std::borrow; use std::cmp::Ordering; @@ -432,6 +434,9 @@ impl<T: ?Sized> AsRef<T> for Arc<T> { } } +unsafe impl<T: ?Sized> StableDeref for Arc<T> {} +unsafe impl<T: ?Sized> CloneStableDeref for Arc<T> {} + // This is what the HeapSize crate does for regular arc, but is questionably // sound. See https://github.com/servo/heapsize/issues/37 #[cfg(feature = "servo")] |