aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/thread_state.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-09-06 11:13:50 +0800
committerSimon Sapin <simon.sapin@exyr.org>2016-11-05 17:29:52 +0100
commitde4fe6e2b69acebf015e0b154f3ebd0371f530f9 (patch)
tree788591e218c70117b4764ead369db5385262dece /components/style/thread_state.rs
parentf7875dad1a43792ff3869f292990d03d30ebd9eb (diff)
downloadservo-de4fe6e2b69acebf015e0b154f3ebd0371f530f9.tar.gz
servo-de4fe6e2b69acebf015e0b154f3ebd0371f530f9.zip
Concurrent rule tree, v1
This patch introduces infrastructure for the rule tree, and constructs it. We don't use it yet, nor have good heuristics for GC'ing it, but this should not happen anymore once we store the rule node reference in the node. I haven't messed up with memory orders because I want to do a try run with it, then mess with them. Take down the ApplicableDeclarationsCache, use the rule tree for doing the cascade.
Diffstat (limited to 'components/style/thread_state.rs')
-rw-r--r--components/style/thread_state.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/style/thread_state.rs b/components/style/thread_state.rs
index 25e77ecbb45..12e52425f55 100644
--- a/components/style/thread_state.rs
+++ b/components/style/thread_state.rs
@@ -24,6 +24,10 @@ bitflags! {
macro_rules! thread_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
impl ThreadState {
+ pub fn is_worker(self) -> bool {
+ self.contains(IN_WORKER)
+ }
+
$(
#[cfg(debug_assertions)]
pub fn $fun(self) -> bool {