aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/worklet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/worklet.rs')
-rw-r--r--components/script/dom/worklet.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs
index efa2f34aa62..752aa4e5e9e 100644
--- a/components/script/dom/worklet.rs
+++ b/components/script/dom/worklet.rs
@@ -428,7 +428,7 @@ struct WorkletThreadInit {
}
/// A thread for executing worklets.
-#[crown::unrooted_must_root_lint::must_root]
+#[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)]
struct WorkletThread {
/// Which role the thread is currently playing
role: WorkletThreadRole,
@@ -467,7 +467,7 @@ unsafe impl JSTraceable for WorkletThread {
impl WorkletThread {
/// Spawn a new worklet thread, returning the channel to send it control messages.
#[allow(unsafe_code)]
- #[allow(crown::unrooted_must_root)]
+ #[cfg_attr(crown, allow(crown::unrooted_must_root))]
fn spawn(
role: WorkletThreadRole,
init: WorkletThreadInit,