Rosemary Ajayi
a5bcae212a
clippy: Fix clippy problems in components/script/dom
( #31891 )
...
* deref on an immutable reference
* use of with literal radix of 10
* fix
2024-03-27 18:36:16 +00:00
Rosemary Ajayi
15cb9dd5fc
clippy: Fix various warnings in components/script/dom
( #31890 )
...
* redundant field names in struct initialization
* reduthis pattern creates a reference to a reference
2024-03-27 10:19:49 +00:00
Mucha Naibei
d1fd8d55ab
Fix rustdoc errors in components/script/dom
( #31617 )
...
* Fix rustdoc errors in components/script/dom
* Revert if to iff in audiobuffer.rs
2024-03-11 22:04:05 +00:00
Samson
604979e367
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>
2023-12-01 15:50:52 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) ( #30325 )
...
* strict imports formatting
* Reformat all imports
2023-09-11 19:16:54 +00:00
Josh Matthews
a5d0e0b1c1
Extract some thread local use from generic code.
2020-06-04 20:54:36 -04:00
Simon Sapin
bea73951db
Use #![register_tool]
instead of #![register_attr]
...
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
Manish Goregaokar
611dc4bc70
Remove now-unnecessary must_root and allow(unrooted_must_root) annotations
2019-01-04 15:05:07 -08:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3)
2018-11-19 14:47:12 +01:00
Simon Sapin
9f977c5287
Remove useless use crate_name;
imports.
...
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Simon Sapin
76e59a46d3
Sort use
statements
2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee
cargo fix --edition
2018-11-06 15:26:02 +01:00
CYBAI
bca951d79e
Drop TrustedPromise
before dropping JSRuntime
2018-10-21 21:30:19 +08:00
chansuke
c37a345dc9
Format script component
2018-09-19 17:40:47 -04:00
CYBAI
9ee27d62ae
Use specific assertion for DOM binding refcounted
2018-01-26 01:18:55 +08:00
Josh Matthews
c075372739
Do not trace Rust values when thread is shutting down.
2017-10-20 13:50:40 -04:00
Anthony Ramine
1ff6c4f9aa
Make DomRoot::new unsafe
2017-09-26 16:10:30 +02:00
Anthony Ramine
f87c2a8d76
Rename Root<T> to DomRoot<T>
...
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.
2017-09-26 09:49:10 +02:00
Anthony Ramine
0e3c54c191
Rename dom::bindings::js to dom::bindings::root
2017-09-26 02:19:05 +02:00
Anthony Ramine
af2e83f378
Make Promise::reject_error sound
2017-09-22 02:15:22 +02:00
Anthony Ramine
5addc2dfa3
Make Promise::resolve_native actually sound
...
We shouldn't have to pass a raw JSContext pointer, and to enter the
promise's context's compartment by hand.
2017-09-21 16:00:48 +02:00
Anthony Ramine
6c9fb5ae7a
Introduce TaskOnce
...
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
2017-09-20 10:37:09 +02:00
Anthony Ramine
52527d6f9d
Rename Task to TaskBox
2017-09-20 10:07:29 +02:00
Anthony Ramine
f088b708c9
Make Task require Send
2017-09-20 09:40:53 +02:00
Anthony Ramine
a7655a3f84
Use task! to resolve promises
2017-09-18 10:49:36 +02:00
Anthony Ramine
851d40b204
Use task! to reject promises
2017-09-18 10:42:05 +02:00
Anthony Ramine
46628fba05
Move Task to its own module
2017-09-18 02:47:04 +02:00
Anthony Ramine
95dc54d216
Use normal tasks to reject and resolve promises
2017-09-17 01:34:07 +02:00
Anthony Ramine
56117d3185
Rename Runnable to Task
...
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`.
2017-09-16 15:43:26 +02:00
Fernando Jiménez Moreno
9ec8575f57
Update Trusted<T> documentation
2017-08-09 16:57:32 +02:00
Simon Sapin
a205c82264
Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)
2017-07-27 02:21:01 +02:00
Alan Jeffrey
328fb25a65
Implemented paint worklet rendering context.
2017-06-30 16:41:08 -05:00
Alan Jeffrey
af8436c9be
Implemented Houdini worklets.
2017-05-17 09:01:05 -05:00
Corey Farwell
449f6337d4
Rename Reflectable
to DomObject
.
...
Fixes https://github.com/servo/servo/issues/8473 .
2016-12-08 08:50:35 -10:00
Josh Matthews
498ccd41e8
Support an equivalent of Trusted<T> for Rc<Promise> objects named TrustedPromise.
2016-09-22 16:16:59 -04:00
Alan Jeffrey
6a271b0527
Remove mutex from Trusted
...
Use weak references rather than message passing to
garbage-collect dead references.
2016-08-29 11:56:28 +02:00
Josh Matthews
293d465c59
Make debug logging for tracing JS objects more informative.
2016-05-11 08:34:48 -04:00
Anthony Ramine
eb94f1a918
Update SpiderMonkey
2016-05-03 18:36:11 +02:00
Keith Yeung
33acb1937c
Remove extraneous script_chan parameter from Trusted::new
2016-04-28 10:52:44 +02:00
Rahul Sharma
2caa9a2a76
refactors entities from script_thread into script_runtime
2016-04-06 12:46:49 +05:30
rohan.prinja
1f02c4ebbb
task -> thread
2016-01-10 17:58:13 +09:00
Arthur Skobara
8acb21a594
Remove from Trusted::new an unnecessary argument
2015-12-12 22:31:19 +06:00
Ms2ger
0c61be7a57
Rustfmt some of script.
2015-11-18 11:14:05 +01:00
rohan.prinja
51df8e310b
rearrange imports to be in alphabetical order
2015-10-30 20:28:59 +09:00
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Ravi Shankar
89153116fb
Splitting ScriptMsg into various enums; r=jdm
2015-08-15 02:00:48 +05:30