servo: Merge #19613 - style: Workaround a likely valgrind false-positive (from emilio:slotted-list); r=jdm
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 20 Dec 2017 17:08:30 -0600
changeset 448818 3ce865c24dd7348a8ca710656c1e76918542897e
parent 448817 d8e5cace54dca1de98a9581aa66562e7b5f6847c
child 448819 8b7e54e7c8063ccc328c4ca3d68d9b8d66769aa4
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #19613 - style: Workaround a likely valgrind false-positive (from emilio:slotted-list); r=jdm Source-Repo: https://github.com/servo/servo Source-Revision: fd6847fd764c423b8952d59179f5c08ebec185c5
servo/components/style/selector_map.rs
--- a/servo/components/style/selector_map.rs
+++ b/servo/components/style/selector_map.rs
@@ -428,17 +428,23 @@ fn specific_bucket_for<'a>(
         //    Combinator(SlotAssignment),
         //    Slotted(span),
         //    Combinator::PseudoElement,
         //    PseudoElement(::before),
         //  ]
         //
         // So inserting `span` in the rule hash makes sense since we want to
         // match the slotted <span>.
-        Component::Slotted(ref selector) => find_bucket(selector.iter()),
+        //
+        // FIXME(emilio, bug 1426516): The line below causes valgrind failures
+        // and it's probably a false positive, we should uncomment whenever
+        // jseward is back to confirm / whitelist it.
+        //
+        // Meanwhile taking the code path below is slower, but still correct.
+        // Component::Slotted(ref selector) => find_bucket(selector.iter()),
         _ => Bucket::Universal
     }
 }
 
 /// Searches a compound selector from left to right, and returns the appropriate
 /// bucket for it.
 #[inline(always)]
 fn find_bucket<'a>(mut iter: SelectorIter<'a, SelectorImpl>) -> Bucket<'a> {