diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-11-15 17:07:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-15 17:07:13 -0500 |
commit | d92f705573ac26fb8e16abc18d7d19e1fb384715 (patch) | |
tree | 7072475f19a837d6395acfc23061029eeb7619d2 /components/script/dom | |
parent | b9cdf9ebda07411c4c172e945599584edc5ba474 (diff) | |
parent | bea73951db5a758f78842a0056daccba9d89a9c0 (diff) | |
download | servo-d92f705573ac26fb8e16abc18d7d19e1fb384715.tar.gz servo-d92f705573ac26fb8e16abc18d7d19e1fb384715.zip |
Auto merge of #24750 - servo:register-tool, r=jdm
Use `#![register_tool]` instead of `Registry::register_attribute`
CC https://github.com/rust-lang/rust/pull/66344, https://github.com/rust-lang/rust/issues/66079
Diffstat (limited to 'components/script/dom')
36 files changed, 58 insertions, 57 deletions
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs index 6059d75605a..fe6b8d36d39 100644 --- a/components/script/dom/bindings/callback.rs +++ b/components/script/dom/bindings/callback.rs @@ -40,7 +40,7 @@ pub enum ExceptionHandling { /// A common base class for representing IDL callback function and /// callback interface types. #[derive(JSTraceable)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct CallbackObject { /// The underlying `JSObject`. callback: Heap<*mut JSObject>, @@ -131,7 +131,7 @@ pub trait CallbackContainer { /// A common base class for representing IDL callback function types. #[derive(JSTraceable, PartialEq)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct CallbackFunction { object: CallbackObject, } @@ -159,7 +159,7 @@ impl CallbackFunction { /// A common base class for representing IDL callback interface types. #[derive(JSTraceable, PartialEq)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct CallbackInterface { object: CallbackObject, } diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index e660471364e..0a1df6553fa 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -6406,7 +6406,7 @@ class CGDictionary(CGThing): derive = ["JSTraceable"] mustRoot = "" if self.membersNeedTracing(): - mustRoot = "#[must_root]\n" + mustRoot = "#[unrooted_must_root_lint::must_root]\n" derive += ["Default"] return (string.Template( @@ -6927,7 +6927,8 @@ class CGCallback(CGClass): bases=[ClassBase(baseName)], constructors=self.getConstructors(), methods=realMethods, - decorators="#[derive(JSTraceable, PartialEq)]\n#[allow_unrooted_interior]") + decorators="#[derive(JSTraceable, PartialEq)]\n" + "#[unrooted_must_root_lint::allow_unrooted_interior]") def getConstructors(self): return [ClassConstructor( diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs index 8636f910121..ad5be5bb0cf 100644 --- a/components/script/dom/bindings/refcounted.rs +++ b/components/script/dom/bindings/refcounted.rs @@ -151,7 +151,7 @@ impl TrustedPromise { /// shared among threads for use in asynchronous operations. The underlying /// DOM object is guaranteed to live at least as long as the last outstanding /// `Trusted<T>` instance. -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct Trusted<T: DomObject> { /// A pointer to the Rust DOM object of type T, but void to allow /// sending `Trusted<T>` between threads, regardless of T's sendability. diff --git a/components/script/dom/bindings/reflector.rs b/components/script/dom/bindings/reflector.rs index dc13fca77b0..2b5a4987eb5 100644 --- a/components/script/dom/bindings/reflector.rs +++ b/components/script/dom/bindings/reflector.rs @@ -30,7 +30,7 @@ where /// A struct to store a reference to the reflector of a DOM object. #[allow(unrooted_must_root)] #[derive(MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] // If you're renaming or moving this field, update the path in plugins::reflector as well pub struct Reflector { #[ignore_malloc_size_of = "defined and measured in rust-mozjs"] diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs index 6e2c883984c..19df89df53f 100644 --- a/components/script/dom/bindings/root.rs +++ b/components/script/dom/bindings/root.rs @@ -46,7 +46,7 @@ use style::thread_state; /// A rooted value. #[allow(unrooted_must_root)] -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct Root<T: StableTraceObject> { /// The value to root. value: T, @@ -283,7 +283,7 @@ where /// on the stack, the `Dom<T>` can point to freed memory. /// /// This should only be used as a field in other DOM objects. -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct Dom<T> { ptr: ptr::NonNull<T>, } @@ -343,7 +343,7 @@ unsafe impl<T: DomObject> JSTraceable for Dom<T> { /// An unrooted reference to a DOM object for use in layout. `Layout*Helpers` /// traits must be implemented on this. -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct LayoutDom<T> { ptr: ptr::NonNull<T>, } @@ -463,7 +463,7 @@ impl LayoutDom<Node> { /// /// This should only be used as a field in other DOM objects; see warning /// on `Dom<T>`. -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable)] pub struct MutDom<T: DomObject> { val: UnsafeCell<Dom<T>>, @@ -518,7 +518,7 @@ impl<T: DomObject + PartialEq> PartialEq<T> for MutDom<T> { /// /// This should only be used as a field in other DOM objects; see warning /// on `Dom<T>`. -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable)] pub struct MutNullableDom<T: DomObject> { ptr: UnsafeCell<Option<Dom<T>>>, @@ -616,7 +616,7 @@ impl<T: DomObject> MallocSizeOf for MutNullableDom<T> { /// /// This should only be used as a field in other DOM objects; see warning /// on `Dom<T>`. -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct DomOnceCell<T: DomObject> { ptr: OnceCell<Dom<T>>, } diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 7869d1499ac..65faac1bb95 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -883,7 +883,7 @@ impl<'a, T: JSTraceable + 'static> Drop for RootedTraceable<'a, T> { /// If you have GC things like *mut JSObject or JSVal, use rooted!. /// If you have an arbitrary number of DomObjects to root, use rooted_vec!. /// If you know what you're doing, use this. -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct RootedTraceableBox<T: 'static + JSTraceable> { ptr: *mut T, } @@ -954,7 +954,7 @@ impl<T: JSTraceable + 'static> Drop for RootedTraceableBox<T> { /// iterator of `DomRoot`s, `rooted_vec!(let v <- iterator);`. #[allow(unrooted_must_root)] #[derive(JSTraceable)] -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct RootableVec<T: JSTraceable> { v: Vec<T>, } @@ -967,7 +967,7 @@ impl<T: JSTraceable> RootableVec<T> { } /// A vector of items that are rooted for the lifetime 'a. -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct RootedVec<'a, T: 'static + JSTraceable> { root: &'a mut RootableVec<T>, } diff --git a/components/script/dom/bindings/weakref.rs b/components/script/dom/bindings/weakref.rs index bea2141d142..5c74e111816 100644 --- a/components/script/dom/bindings/weakref.rs +++ b/components/script/dom/bindings/weakref.rs @@ -34,13 +34,13 @@ pub const DOM_WEAK_SLOT: u32 = 1; /// A weak reference to a JS-managed DOM object. #[allow(unrooted_must_root)] -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct WeakRef<T: WeakReferenceable> { ptr: ptr::NonNull<WeakBox<T>>, } /// The inner box of weak references, public for the finalization in codegen. -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct WeakBox<T: WeakReferenceable> { /// The reference count. When it reaches zero, the `value` field should /// have already been set to `None`. The pointee contributes one to the count. @@ -218,7 +218,7 @@ unsafe impl<T: WeakReferenceable> JSTraceable for MutableWeakRef<T> { /// A vector of weak references. On tracing, the vector retains /// only references which still point to live objects. -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] #[derive(MallocSizeOf)] pub struct WeakRefVec<T: WeakReferenceable> { vec: Vec<WeakRef<T>>, @@ -268,7 +268,7 @@ impl<T: WeakReferenceable> DerefMut for WeakRefVec<T> { /// An entry of a vector of weak references. Passed to the closure /// given to `WeakRefVec::update`. -#[allow_unrooted_interior] +#[unrooted_must_root_lint::allow_unrooted_interior] pub struct WeakRefEntry<'a, T: WeakReferenceable> { vec: &'a mut WeakRefVec<T>, index: &'a mut usize, diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index fbf3e5819be..db90b2d2bda 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -31,7 +31,7 @@ pub struct FileBlob { } /// Different backends of Blob -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable)] pub enum BlobImpl { /// File-based blob, whose content lives in the net process diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index d623f46005a..2ad565f9b45 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -39,7 +39,7 @@ pub struct CSSStyleDeclaration { } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub enum CSSStyleOwner { Element(Dom<Element>), CSSRule( diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs index 64117959500..7b4229835e2 100644 --- a/components/script/dom/customelementregistry.rs +++ b/components/script/dom/customelementregistry.rs @@ -706,7 +706,7 @@ pub fn try_upgrade_element(element: &Element) { } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub enum CustomElementReaction { Upgrade(#[ignore_malloc_size_of = "Rc"] Rc<CustomElementDefinition>), Callback( @@ -752,7 +752,7 @@ enum BackupElementQueueFlag { /// <https://html.spec.whatwg.org/multipage/#custom-element-reactions-stack> #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct CustomElementReactionStack { stack: DomRefCell<Vec<ElementQueue>>, backup_queue: ElementQueue, @@ -934,7 +934,7 @@ impl CustomElementReactionStack { /// <https://html.spec.whatwg.org/multipage/#element-queue> #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] struct ElementQueue { queue: DomRefCell<VecDeque<Dom<Element>>>, } diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index b2a6468bd90..5a344879005 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -4749,7 +4749,7 @@ impl AnimationFrameCallback { } #[derive(Default, JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] struct PendingInOrderScriptVec { scripts: DomRefCell<VecDeque<PendingScript>>, } @@ -4787,7 +4787,7 @@ impl PendingInOrderScriptVec { } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] struct PendingScript { element: Dom<HTMLScriptElement>, load: Option<ScriptResult>, diff --git a/components/script/dom/documentorshadowroot.rs b/components/script/dom/documentorshadowroot.rs index 594801584c8..724ea11da8c 100644 --- a/components/script/dom/documentorshadowroot.rs +++ b/components/script/dom/documentorshadowroot.rs @@ -28,7 +28,7 @@ use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuar use style::stylesheets::{CssRule, Origin, Stylesheet}; #[derive(Clone, JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct StyleSheetInDocument { #[ignore_malloc_size_of = "Arc"] pub sheet: Arc<Stylesheet>, @@ -76,7 +76,7 @@ impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument { } // https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] pub struct DocumentOrShadowRoot { window: Dom<Window>, diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs index 8924f8ddd1c..89410a6b6b0 100644 --- a/components/script/dom/htmlcanvaselement.rs +++ b/components/script/dom/htmlcanvaselement.rs @@ -50,7 +50,7 @@ use style::attr::{AttrValue, LengthOrPercentageOrAuto}; const DEFAULT_WIDTH: u32 = 300; const DEFAULT_HEIGHT: u32 = 150; -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(Clone, JSTraceable, MallocSizeOf)] pub enum CanvasContext { Context2d(Dom<CanvasRenderingContext2D>), diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 698e21517a8..5b6bd321534 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -133,7 +133,7 @@ enum ImageRequestPhase { Current, } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] struct ImageRequest { state: State, parsed_url: Option<ServoUrl>, diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 60b5cb9bcb1..5fdbad5c1bd 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -237,7 +237,7 @@ pub struct HTMLInputElement { } #[derive(JSTraceable)] -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(MallocSizeOf)] struct InputActivationState { indeterminate: bool, diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs index 13c5cd126c7..5afc2deb381 100644 --- a/components/script/dom/htmlmediaelement.rs +++ b/components/script/dom/htmlmediaelement.rs @@ -268,7 +268,7 @@ impl FrameRenderer for MediaFrameRenderer { } } -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] enum SrcObject { MediaStream(Dom<MediaStream>), diff --git a/components/script/dom/messageevent.rs b/components/script/dom/messageevent.rs index 3e9a7079605..9d9e5f88e35 100644 --- a/components/script/dom/messageevent.rs +++ b/components/script/dom/messageevent.rs @@ -26,7 +26,7 @@ use js::jsval::JSVal; use js::rust::HandleValue; use servo_atoms::Atom; -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] enum SrcObject { WindowProxy(Dom<WindowProxy>), diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs index 82fd3be59d6..930fedbbec4 100644 --- a/components/script/dom/nodelist.rs +++ b/components/script/dom/nodelist.rs @@ -13,7 +13,7 @@ use dom_struct::dom_struct; use std::cell::Cell; #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub enum NodeListType { Simple(Vec<Dom<Node>>), Children(ChildrenList), @@ -119,7 +119,7 @@ impl NodeList { } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct ChildrenList { node: Dom<Node>, #[ignore_malloc_size_of = "Defined in rust-mozjs"] diff --git a/components/script/dom/offscreencanvas.rs b/components/script/dom/offscreencanvas.rs index 69c1114768c..2186ba54bc8 100644 --- a/components/script/dom/offscreencanvas.rs +++ b/components/script/dom/offscreencanvas.rs @@ -23,7 +23,7 @@ use ref_filter_map; use std::cell::Cell; use std::cell::Ref; -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(Clone, JSTraceable, MallocSizeOf)] pub enum OffscreenCanvasContext { OffscreenContext2d(Dom<OffscreenCanvasRenderingContext2D>), diff --git a/components/script/dom/paintworkletglobalscope.rs b/components/script/dom/paintworkletglobalscope.rs index bc04ab63440..ce3f955cc9c 100644 --- a/components/script/dom/paintworkletglobalscope.rs +++ b/components/script/dom/paintworkletglobalscope.rs @@ -473,7 +473,7 @@ pub enum PaintWorkletTask { /// This type is dangerous, because it contains uboxed `Heap<JSVal>` values, /// which can't be moved. #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] struct PaintDefinition { #[ignore_malloc_size_of = "mozjs"] class_constructor: Heap<JSVal>, diff --git a/components/script/dom/promise.rs b/components/script/dom/promise.rs index b101c449348..d2e209b98dd 100644 --- a/components/script/dom/promise.rs +++ b/components/script/dom/promise.rs @@ -37,7 +37,7 @@ use std::ptr; use std::rc::Rc; #[dom_struct] -#[allow_unrooted_in_rc] +#[unrooted_must_root_lint::allow_unrooted_in_rc] pub struct Promise { reflector: Reflector, /// Since Promise values are natively reference counted without the knowledge of diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs index 64a26fa0ba9..819cc284d63 100644 --- a/components/script/dom/range.rs +++ b/components/script/dom/range.rs @@ -1011,7 +1011,7 @@ impl RangeMethods for Range { } #[derive(DenyPublicFields, JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct BoundaryPoint { node: MutDom<Node>, offset: Cell<u32>, diff --git a/components/script/dom/raredata.rs b/components/script/dom/raredata.rs index 8c481425982..e32f218ce89 100644 --- a/components/script/dom/raredata.rs +++ b/components/script/dom/raredata.rs @@ -15,7 +15,7 @@ use std::rc::Rc; // storage. #[derive(Default, JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct NodeRareData { /// The shadow root the node belongs to. /// This is None if the node is not in a shadow tree or @@ -28,7 +28,7 @@ pub struct NodeRareData { } #[derive(Default, JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct ElementRareData { /// https://dom.spec.whatwg.org/#dom-element-shadowroot /// The ShadowRoot this element is host of. diff --git a/components/script/dom/servoparser/async_html.rs b/components/script/dom/servoparser/async_html.rs index 42296062840..6930f2553c5 100644 --- a/components/script/dom/servoparser/async_html.rs +++ b/components/script/dom/servoparser/async_html.rs @@ -196,7 +196,7 @@ fn create_buffer_queue(mut buffers: VecDeque<SendTendril<UTF8>>) -> BufferQueue // |_____________| |_______________| // #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct Tokenizer { document: Dom<Document>, #[ignore_malloc_size_of = "Defined in std"] diff --git a/components/script/dom/servoparser/html.rs b/components/script/dom/servoparser/html.rs index c9e3a06f34f..22e2574a9b4 100644 --- a/components/script/dom/servoparser/html.rs +++ b/components/script/dom/servoparser/html.rs @@ -30,7 +30,7 @@ use servo_url::ServoUrl; use std::io; #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct Tokenizer { #[ignore_malloc_size_of = "Defined in html5ever"] inner: HtmlTokenizer<TreeBuilder<Dom<Node>, Sink>>, diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs index 91b5c9bfce6..004daeed9be 100644 --- a/components/script/dom/servoparser/mod.rs +++ b/components/script/dom/servoparser/mod.rs @@ -626,7 +626,7 @@ enum ParserKind { } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] enum Tokenizer { Html(self::html::Tokenizer), AsyncHtml(self::async_html::Tokenizer), @@ -945,7 +945,7 @@ fn insert(parent: &Node, reference_child: Option<&Node>, child: NodeOrText<Dom<N } #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct Sink { base_url: ServoUrl, document: Dom<Document>, diff --git a/components/script/dom/servoparser/prefetch.rs b/components/script/dom/servoparser/prefetch.rs index 906c9352771..d9de4d7036f 100644 --- a/components/script/dom/servoparser/prefetch.rs +++ b/components/script/dom/servoparser/prefetch.rs @@ -32,7 +32,7 @@ use servo_url::ImmutableOrigin; use servo_url::ServoUrl; #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct Tokenizer { #[ignore_malloc_size_of = "Defined in html5ever"] inner: HtmlTokenizer<PrefetchSink>, diff --git a/components/script/dom/servoparser/xml.rs b/components/script/dom/servoparser/xml.rs index 8f30e54174d..ac900d61ce0 100644 --- a/components/script/dom/servoparser/xml.rs +++ b/components/script/dom/servoparser/xml.rs @@ -17,7 +17,7 @@ use xml5ever::tokenizer::XmlTokenizer; use xml5ever::tree_builder::{Tracer as XmlTracer, XmlTreeBuilder}; #[derive(JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct Tokenizer { #[ignore_malloc_size_of = "Defined in xml5ever"] inner: XmlTokenizer<XmlTreeBuilder<Dom<Node>, Sink>>, diff --git a/components/script/dom/stylesheetlist.rs b/components/script/dom/stylesheetlist.rs index 236f1c9cd9a..391ac55ed91 100644 --- a/components/script/dom/stylesheetlist.rs +++ b/components/script/dom/stylesheetlist.rs @@ -16,7 +16,7 @@ use dom_struct::dom_struct; use servo_arc::Arc; use style::stylesheets::Stylesheet; -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] pub enum StyleSheetListOwner { Document(Dom<Document>), diff --git a/components/script/dom/trackevent.rs b/components/script/dom/trackevent.rs index 684a0fcde52..5a734a0e4c9 100644 --- a/components/script/dom/trackevent.rs +++ b/components/script/dom/trackevent.rs @@ -20,7 +20,7 @@ use crate::dom::window::Window; use dom_struct::dom_struct; use servo_atoms::Atom; -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] enum MediaTrack { Video(Dom<VideoTrack>), diff --git a/components/script/dom/webgl_extensions/extensions.rs b/components/script/dom/webgl_extensions/extensions.rs index fa502ca26cd..b7a2f2beb80 100644 --- a/components/script/dom/webgl_extensions/extensions.rs +++ b/components/script/dom/webgl_extensions/extensions.rs @@ -140,7 +140,7 @@ impl WebGLExtensionFeatures { } /// Handles the list of implemented, supported and enabled WebGL extensions. -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] pub struct WebGLExtensions { extensions: DomRefCell<HashMap<String, Box<dyn WebGLExtensionWrapper>>>, diff --git a/components/script/dom/webgl_extensions/wrapper.rs b/components/script/dom/webgl_extensions/wrapper.rs index 6af68c4678e..bf8db31418c 100644 --- a/components/script/dom/webgl_extensions/wrapper.rs +++ b/components/script/dom/webgl_extensions/wrapper.rs @@ -28,7 +28,7 @@ pub trait WebGLExtensionWrapper: JSTraceable + MallocSizeOf { fn as_any(&self) -> &dyn Any; } -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] pub struct TypedWebGLExtensionWrapper<T: WebGLExtension> { extension: MutNullableDom<T::Extension>, diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index df9e194962e..def5b36a27f 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -29,7 +29,7 @@ pub enum CompleteForRendering { MissingColorAttachment, } -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(Clone, JSTraceable, MallocSizeOf)] enum WebGLFramebufferAttachment { Renderbuffer(Dom<WebGLRenderbuffer>), diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index c843ab578d1..74fd8068a72 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -4275,7 +4275,7 @@ capabilities! { STENCIL_TEST, } -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] pub struct Textures { active_unit: Cell<u32>, @@ -4343,7 +4343,7 @@ impl Textures { } } -#[must_root] +#[unrooted_must_root_lint::must_root] #[derive(Default, JSTraceable, MallocSizeOf)] struct TextureUnit { tex_2d: MutNullableDom<WebGLTexture>, diff --git a/components/script/dom/webglvertexarrayobjectoes.rs b/components/script/dom/webglvertexarrayobjectoes.rs index 22d162782d8..e54eaf3f04a 100644 --- a/components/script/dom/webglvertexarrayobjectoes.rs +++ b/components/script/dom/webglvertexarrayobjectoes.rs @@ -258,7 +258,7 @@ impl Drop for WebGLVertexArrayObjectOES { } #[derive(Clone, JSTraceable, MallocSizeOf)] -#[must_root] +#[unrooted_must_root_lint::must_root] pub struct VertexAttribData { pub enabled_as_array: bool, pub size: u8, diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs index 398710ee558..e882566e07f 100644 --- a/components/script/dom/worklet.rs +++ b/components/script/dom/worklet.rs @@ -417,7 +417,7 @@ struct WorkletThreadInit { } /// A thread for executing worklets. -#[must_root] +#[unrooted_must_root_lint::must_root] struct WorkletThread { /// Which role the thread is currently playing role: WorkletThreadRole, |