aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/refcounted.rs
Commit message (Collapse)AuthorAgeFilesLines
* refactor: add CanGc as argument to Promise::reject_error (#35646)Yerkebulan Tulibergenov2025-02-251-1/+1
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* refactor: add CanGc as argument to Promise::resolve (#35616)Yerkebulan Tulibergenov2025-02-231-1/+2
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-7/+7
| | | | | | | | | | | | | * script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Downgrade noisy debug logs. (#34914)Josh Matthews2025-01-091-3/+3
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Use `enum`s for event loop senders and receivers (#34896)Martin Robinson2025-01-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | Previously, senders and receivers to different kinds of event loops (the main `ScriptThread`, different types of workers) used a rust `trait` mechanism to implement dynamic behavior. This led to having many unused implementations of this `trait`. This change moves to using an `enum` based approach for these senders and receivers and removes all of the dead code. In addition, to allowing for use of rust's dead code detection, it simplifies the code a great deal. All of these generic senders and receivers are moved to the `messaging.rs` file and given proper documentation. Finally, empty an `JSTraceable` implementation is made for all crossbeam `Sender<...>`s to avoid having to manually skip them everytime they are included in structs. The pre-existing empty `MallocSizeOf` implementation is used more thoroughly. Other unecessary wrappers around these senders and receivers are removed as well. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix a variety of clippy warnings in `fonts`, `layout_2020` and the ↵chickenleaf2024-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM code (#33894) * fixed some clippy warnings Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Delete extra file Signed-off-by: chickenleaf <lashwinib@gmail.com> * preserved newline in compositionevent.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> * removed the newline in PrototypeList Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the trailing whitespace Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix clippy problems in `components/script/dom` (#31891)Rosemary Ajayi2024-03-271-2/+2
| | | | | | | * deref on an immutable reference * use of with literal radix of 10 * fix
* clippy: Fix various warnings in `components/script/dom` (#31890)Rosemary Ajayi2024-03-271-8/+8
| | | | | * redundant field names in struct initialization * reduthis pattern creates a reference to a reference
* Fix rustdoc errors in `components/script/dom` (#31617)Mucha Naibei2024-03-111-1/+1
| | | | | * Fix rustdoc errors in components/script/dom * Revert if to iff in audiobuffer.rs
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-9/+12
| | | | | * strict imports formatting * Reformat all imports
* Extract some thread local use from generic code.Josh Matthews2020-06-041-21/+37
|
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Remove now-unnecessary must_root and allow(unrooted_must_root) annotationsManish Goregaokar2019-01-041-1/+0
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* Reorder importsPyfisch2018-11-061-1/+1
|
* Sort `use` statementsSimon Sapin2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-7/+7
|
* Drop `TrustedPromise` before dropping JSRuntimeCYBAI2018-10-211-0/+6
|
* Format script componentchansuke2018-09-191-15/+21
|
* Use specific assertion for DOM binding refcountedCYBAI2018-01-261-1/+1
|
* Do not trace Rust values when thread is shutting down.Josh Matthews2017-10-201-3/+1
|
* Make DomRoot::new unsafeAnthony Ramine2017-09-261-2/+1
|
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Make Promise::reject_error soundAnthony Ramine2017-09-221-5/+1
|
* Make Promise::resolve_native actually soundAnthony Ramine2017-09-211-4/+1
| | | | | We shouldn't have to pass a raw JSContext pointer, and to enter the promise's context's compartment by hand.
* Introduce TaskOnceAnthony Ramine2017-09-201-3/+3
| | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* Rename Task to TaskBoxAnthony Ramine2017-09-201-3/+3
|
* Make Task require SendAnthony Ramine2017-09-201-2/+2
|
* Use task! to resolve promisesAnthony Ramine2017-09-181-12/+8
|
* Use task! to reject promisesAnthony Ramine2017-09-181-12/+8
|
* Move Task to its own moduleAnthony Ramine2017-09-181-1/+1
|
* Use normal tasks to reject and resolve promisesAnthony Ramine2017-09-171-5/+5
|
* Rename Runnable to TaskAnthony Ramine2017-09-161-11/+11
| | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* Update Trusted<T> documentationFernando Jiménez Moreno2017-08-091-1/+1
|
* Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)Simon Sapin2017-07-271-1/+1
|
* Implemented paint worklet rendering context.Alan Jeffrey2017-06-301-0/+2
|
* Implemented Houdini worklets.Alan Jeffrey2017-05-171-0/+39
|
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-7/+7
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Support an equivalent of Trusted<T> for Rc<Promise> objects named ↵Josh Matthews2016-09-221-8/+86
| | | | TrustedPromise.
* Remove mutex from TrustedAlan Jeffrey2016-08-291-77/+52
| | | | | Use weak references rather than message passing to garbage-collect dead references.
* Make debug logging for tracing JS objects more informative.Josh Matthews2016-05-111-1/+2
|
* Update SpiderMonkeyAnthony Ramine2016-05-031-1/+2
|
* Remove extraneous script_chan parameter from Trusted::newKeith Yeung2016-04-281-1/+2
|
* refactors entities from script_thread into script_runtimeRahul Sharma2016-04-061-1/+1
|
* task -> threadrohan.prinja2016-01-101-10/+10
|
* Remove from Trusted::new an unnecessary argumentArthur Skobara2015-12-121-2/+2
|