Oluwatobi Sofela
2789e98876
clippy: Fix redundant field names warnings ( #31793 )
2024-03-20 23:05:29 +00:00
Rosemary Ajayi
058319aa0b
clippy: Fix some clippy problems in components/script
( #31778 )
...
* fix clippy problems in stylesheet
* fix clippy problems in task_manager
* fix clippy problems in task_queue
* fix clippy problems in task_queue
* fix clippy problems in file_reading
* fix clippy problems in dom_manipulation
* fix clippy problems in gamepad
* fix clippy problems in networking
* fix clippy problems in performance
* fix clippy problems in port_message
* fix clippy problems in port_message
* fix clippy problems in timer
* fix clippy problems in stylesheet
* fix clippy problems
* fix clippy problems
* fix clippy problems
2024-03-20 18:41:07 +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
Samson
9514f670d1
No tracing of nop traceable fields ( #29926 )
...
* Add `no_trace` option to JSTraceable derive
* NoTrace wrapper
* Port some types to no_trace schematics
* Fixing my unsafe mistakes (not tracing traceables)
* Add docs & safety guards for no_trace
Safety guards (trait shenanigans) guarantees safety usage of `no_trace`
* Port canvas_traits to no_trace
* Port servo_media to no_trace
* Port net_traits to no_trace
* Port style to no_trace
* Port webgpu to no_trace
* Port script_traits to no_trace
* Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace
* unrooted_must_root lint in seperate file
* Add trace_in_no_trace_lint as script_plugin
* Composable types in must_not_have_traceable
* Introduced HashMapTracedValues wrapper
* `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>`
* Port rest of servo's types to no_trace
* Port html5ever, euclid, mime and http to no_trace
* Port remaining externals to no_trace
* Port webxr and Arc<Mutex<_>>
* Fix spelling in notrace doc
2023-08-04 10:17:43 +00:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3)
2018-11-19 14:47:12 +01:00
Simon Sapin
2012be4a8b
cargo fix --edition-idioms
2018-11-08 09:28:00 +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
42903412c7
Make first argument of DOMManipulationTaskSource as a Box<ScriptChan +
...
Send>
We don't have `window` for `workers`. So, if we use `global.as_window()`
to get the DOMManipulationTaskSource, it will make worker panic.
Instead, we should get the DOMManipulationTaskSource from each own
thread.
Ref: https://github.com/servo/servo/pull/20755#discussion_r193557746
2018-10-18 19:13:23 +08:00
chansuke
c37a345dc9
Format script component
2018-09-19 17:40:47 -04:00
Simon Sapin
2a996fbc8f
Replace mpsc with crossbeam/servo channel, update ipc-channel
...
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Agustin Chiappe Berrini
e286fdcc53
Add the TaskSourceName to CommonScriptMsg::Task
...
Update QueuedTaskConversion and the TaskQueue to use it
2018-09-04 09:17:11 -04:00
Gregory Terzian
671627e97e
introduce "per task source" ignoring of tasks
2018-07-10 13:42:28 +08:00
ddh
52b63def44
added pipelines to all task sources
...
changed task sources to accept pipeline ids
2017-10-25 14:25:58 +01:00
ddh
2ffbe53989
added time to interactive metrics, refactored metrics to use traits
...
changed task macro to take pipeline info
2017-10-24 21:02:56 +01:00
Simon Sapin
aa15dc269f
Remove use of unstable box syntax.
...
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.
This is expected since `Box::new` is defined as:
```rust
impl<T> Box<T> {
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
}
```
With inlining, it should compile to the same as box syntax.
2017-10-16 17:16:20 +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
46628fba05
Move Task to its own module
2017-09-18 02:47:04 +02:00
Anthony Ramine
8e78f18d2d
Introduce MainThreadScriptMsg::DispatchJobQueue
...
This removes the last remaining use of Task::run_with_script_thread
2017-09-17 10:46:00 +02:00
Anthony Ramine
9a267e53fe
Send AsyncJobHandler as a MainThreadTask
2017-09-16 15:43:33 +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
Anthony Ramine
53d30d85b3
Reformat some task-related functions
2017-09-08 10:19:06 +02:00
Anthony Ramine
9252f2b8a2
Kill DOMManipulationTask
...
Just use a bare Runnable value.
2017-09-08 10:06:18 +02:00
Anthony Ramine
17a1dd9385
Kill Runnable::is_cancelled ⚔️
2017-09-07 14:54:03 +02:00
Clément DAVID
c5fe235112
order derivable traits lists
...
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Alan Jeffrey
a47e94c8f6
Added Debug implementations.
2017-06-13 10:46:59 -05:00
Simon Sapin
53b638c0e2
Update to string-cache 0.3
2016-11-03 16:23:05 +01:00
Anthony Ramine
44ca9f3d71
Make TaskSource::queue take a &GlobalScope
2016-10-06 21:35:52 +02:00
Josh Matthews
2aef518ce6
Make task queue API usable from non-main threads.
2016-07-14 13:27:41 -04:00
Connor Brewster
ad30275d04
Move boxing to runnable initialization
2016-07-13 11:10:23 -06:00
Connor Brewster
5f7324a9a5
Make all task source runnables cancellable
...
Implement all Runnable methods on CancellableRunnable to redirect to their inner runnable
2016-07-13 09:59:51 -06:00
Connor Brewster
afc0ccb48d
Add event runnables
...
Make tasks a wrapper over runnables
2016-07-11 22:21:45 -06:00
Connor Brewster
d6f4dc06df
Combined DOMManipulationTask runnable variants into a single variant
2016-07-06 10:46:56 -06:00
Manish Goregaokar
5dde01ab5a
Add Miscellaneous event type to DOM task source
2016-07-05 13:46:01 +05:30
Ms2ger
0861b701d5
Derive Clone for DOMManipulationTaskSource, UserInteractionTaskSource.
2016-06-03 09:33:18 +02:00
Keith Yeung
05fc799f92
Clean up DOMManipulationTaskSource
2016-06-02 15:27:08 -04:00
Keith Yeung
cc049515dc
Implement user interaction task source
2016-05-11 10:12:25 -04:00
Keith Yeung
12a96f7194
Rename DOM manipulation messages to tasks
2016-05-04 21:01:26 -04:00
Josh Matthews
5918954edd
Add media tasks to the DOM manipulation task queue.
2016-05-03 16:25:22 -04:00
faineance
7c45a4fea0
change changes effecting verbosity
2016-03-27 13:54:41 +01:00
faineance
418842faf9
use self.0 instead of destructing single item tuple structs
2016-03-27 11:50:08 +01:00
Keith Yeung
3f2cbf0025
Add task_source directory
...
Use DOMManipulationTaskSource whenever possible
2016-03-10 01:05:53 -05:00