From 3bce0c7652c74f0703bc1ac51fdb26c35c6e990b Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 11 Jul 2017 17:20:52 -0700 Subject: [PATCH] Stop using SendElement in StyleSharingCandiate. MozReview-Commit-ID: AuNPDsq8bgk --- components/style/sharing/mod.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs index 2d540c5f436..8f82e6d6ea0 100644 --- a/components/style/sharing/mod.rs +++ b/components/style/sharing/mod.rs @@ -221,9 +221,8 @@ impl ValidationData { /// FakeCandidate below. #[derive(Debug)] pub struct StyleSharingCandidate { - /// The element. We use SendElement here so that the cache may live in - /// ScopedTLS. - element: SendElement, + /// The element. + element: E, validation_data: ValidationData, } @@ -244,12 +243,12 @@ impl Deref for StyleSharingCandidate { impl StyleSharingCandidate { /// Get the classlist of this candidate. fn class_list(&mut self) -> &[Atom] { - self.validation_data.class_list(*self.element) + self.validation_data.class_list(self.element) } /// Get the pres hints of this candidate. fn pres_hints(&mut self) -> &[ApplicableDeclarationBlock] { - self.validation_data.pres_hints(*self.element) + self.validation_data.pres_hints(self.element) } /// Compute the bit vector of revalidation selector match results @@ -260,7 +259,7 @@ impl StyleSharingCandidate { bloom: &StyleBloom, ) -> &BitVec { self.validation_data.revalidation_match_results( - *self.element, + self.element, stylist, bloom, /* bloom_known_valid = */ false, @@ -590,7 +589,7 @@ impl StyleSharingCandidateCache { self.dom_depth = dom_depth; } self.cache_mut().insert(StyleSharingCandidate { - element: unsafe { SendElement::new(*element) }, + element: *element, validation_data: validation_data, }); }