diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2023-12-01 16:50:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 15:50:52 +0000 |
commit | 604979e367faa6aa09805e8fa0223b8883ea009d (patch) | |
tree | b61c5ffefbd4c43aa3e81bd89b70dad41d7c2626 /components/script/dom/bindings/refcounted.rs | |
parent | 20a73721de2f1a8a0b29905617783148bd3cfaff (diff) | |
download | servo-604979e367faa6aa09805e8fa0223b8883ea009d.tar.gz servo-604979e367faa6aa09805e8fa0223b8883ea009d.zip |
Replace script_plugins with a clippy like rustc driver (named crown) (#30508)
* Remove script_plugins
* Use crown instead of script_plugins
* crown_is_not_used
* Use crown in command base
* bootstrap crown
* tidy happy
* disable sccache
* Bring crown in tree
* Install crown from tree
* fix windows ci
* fix warning
* fix mac
libscript_plugins.dylib is not available anymore
* Update components/script/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Update for nightly-2023-03-18
Mostly just based off https://github.com/servo/servo/pull/30630
* Always install crown
it's slow only when there is new version
* Run crown test with `mach test-unit`
* Small fixups; better trace_in_no_trace tests
* Better doc
* crown in config.toml
* Fix tidy for real
* no sccache on rustc_wrapper
* document rustc overrides
* fixup of compiletest
* Make a few minor comment adjustments
* Fix a typo in python/servo/platform/base.py
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* Proper test types
* Ignore tidy on crown/tests
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/bindings/refcounted.rs')
-rw-r--r-- | components/script/dom/bindings/refcounted.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs index 0279e98b6ba..3bf2dcef22e 100644 --- a/components/script/dom/bindings/refcounted.rs +++ b/components/script/dom/bindings/refcounted.rs @@ -80,7 +80,7 @@ impl TrustedPromise { /// Create a new `TrustedPromise` instance from an existing DOM object. The object will /// be prevented from being GCed for the duration of the resulting `TrustedPromise` object's /// lifetime. - #[allow(unrooted_must_root)] + #[allow(crown::unrooted_must_root)] pub fn new(promise: Rc<Promise>) -> TrustedPromise { LIVE_REFERENCES.with(|ref r| { let r = r.borrow(); @@ -130,7 +130,7 @@ impl TrustedPromise { } /// A task which will reject the promise. - #[allow(unrooted_must_root)] + #[allow(crown::unrooted_must_root)] pub fn reject_task(self, error: Error) -> impl TaskOnce { let this = self; task!(reject_promise: move || { @@ -140,7 +140,7 @@ impl TrustedPromise { } /// A task which will resolve the promise. - #[allow(unrooted_must_root)] + #[allow(crown::unrooted_must_root)] pub fn resolve_task<T>(self, value: T) -> impl TaskOnce where T: ToJSValConvertible + Send, @@ -157,7 +157,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. -#[unrooted_must_root_lint::allow_unrooted_interior] +#[crown::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. @@ -220,7 +220,7 @@ impl<T: DomObject> Clone for Trusted<T> { /// The set of live, pinned DOM objects that are currently prevented /// from being garbage collected due to outstanding references. -#[allow(unrooted_must_root)] +#[allow(crown::unrooted_must_root)] pub struct LiveDOMReferences { // keyed on pointer to Rust DOM object reflectable_table: RefCell<HashMap<*const libc::c_void, Weak<TrustedReference>>>, @@ -244,7 +244,7 @@ impl LiveDOMReferences { }); } - #[allow(unrooted_must_root)] + #[allow(crown::unrooted_must_root)] fn addref_promise(&self, promise: Rc<Promise>) { let mut table = self.promise_table.borrow_mut(); table.entry(&*promise).or_insert(vec![]).push(promise) @@ -294,7 +294,7 @@ fn remove_nulls<K: Eq + Hash + Clone, V>(table: &mut HashMap<K, Weak<V>>) { } /// A JSTraceDataOp for tracing reflectors held in LIVE_REFERENCES -#[allow(unrooted_must_root)] +#[allow(crown::unrooted_must_root)] pub unsafe fn trace_refcounted_objects(tracer: *mut JSTracer) { info!("tracing live refcounted references"); LIVE_REFERENCES.with(|ref r| { |