aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/layout_debug.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout_2020/layout_debug.rs')
-rw-r--r--components/layout_2020/layout_debug.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/components/layout_2020/layout_debug.rs b/components/layout_2020/layout_debug.rs
index 6720d99e0a2..642e6b8a538 100644
--- a/components/layout_2020/layout_debug.rs
+++ b/components/layout_2020/layout_debug.rs
@@ -5,18 +5,20 @@
//! Supports writing a trace file created during each layout scope
//! that can be viewed by an external tool to make layout debugging easier.
-use crate::flow::BoxTree;
-use crate::fragment_tree::FragmentTree;
-#[cfg(not(debug_assertions))]
-use serde::ser::Serializer;
-use serde::Serialize;
-use serde_json::{to_string, to_value, Value};
use std::cell::RefCell;
use std::fs;
#[cfg(debug_assertions)]
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
+#[cfg(not(debug_assertions))]
+use serde::ser::Serializer;
+use serde::Serialize;
+use serde_json::{to_string, to_value, Value};
+
+use crate::flow::BoxTree;
+use crate::fragment_tree::FragmentTree;
+
thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None));
#[cfg(debug_assertions)]