aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task_source
Commit message (Collapse)AuthorAgeFilesLines
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-1112-29/+48
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-0411-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* remove unnecessary thread in filereader, add stream TODOGregory Terzian2019-12-101-2/+1
|
* impl timer-task-source, dedicated time-out mechanism for service-workerGregory Terzian2019-11-192-0/+44
|
* continue messageport, transferable, postmessage optionsGregory Terzian2019-10-191-6/+2
|
* begin messageport, transferable objects, implKeith Yeung2019-10-192-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept transfer argument for StructuredCloneData::write Allow structured clone reads to return a boolean Add Transferable trait Add basic skeletons to MessagePort Implement transfer and transfer-receiving steps on MessagePort Use transfer and transfer_receive in StructuredClone callbacks Implement MessageChannel Freeze the array object for the MessageEvent ports attribute Implement transfer argument on window.postMessage Use ReentrantMutex instead for MessagePortInternal Accept origin as a parameter in dispatch_jsval Fix BorrowMut crash with pending_port_message Detach port on closure and check for detached during transfer Enable webmessaging tests fix webidl fix
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-1910-10/+10
|
* Update crossbeam-channel to 0.3Bastien Orivel2018-11-183-3/+3
|
* Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-141-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
* Implement TaskSource for HistoryTraversalAgustin Chiappe Berrini2018-11-131-5/+25
| | | | | And remove the method in window that returns it, because it isn't used so far.
* `cargo fix --edition-idioms`Simon Sapin2018-11-087-7/+7
|
* Reorder importsPyfisch2018-11-062-3/+3
|
* Sort `use` statementsSimon Sapin2018-11-069-18/+18
|
* `cargo fix --edition`Simon Sapin2018-11-0610-49/+49
|
* Make first argument of DOMManipulationTaskSource as a Box<ScriptChan +CYBAI2018-10-181-8/+13
| | | | | | | | | | | 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
* Add task source for media elementchansuke2018-10-102-0/+53
|
* Format script componentchansuke2018-09-199-63/+41
|
* Replace mpsc with crossbeam/servo channel, update ipc-channelSimon Sapin2018-09-123-3/+3
| | | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Add Websocket task sourceAgustin Chiappe Berrini2018-09-082-1/+40
| | | | | | | | According to the doc: https://html.spec.whatwg.org/multipage/web-sockets.html#network The task source for all tasks queued in the websocket section are the websocket task source, so this commit also updates those references to use the appropriate one.
* Add the TaskSourceName to CommonScriptMsg::TaskAgustin Chiappe Berrini2018-09-047-5/+12
| | | | Update QueuedTaskConversion and the TaskQueue to use it
* use remote-event task source in EventSourceGregory Terzian2018-07-132-1/+39
|
* introduce "per task source" ignoring of tasksGregory Terzian2018-07-106-6/+41
|
* added pipelines to all task sourcesddh2017-10-255-14/+19
| | | | changed task sources to accept pipeline ids
* added time to interactive metrics, refactored metrics to use traitsddh2017-10-245-1/+7
| | | | changed task macro to take pipeline info
* Remove use of unstable box syntax.Simon Sapin2017-10-166-7/+7
| | | | | | | | | | | | | | | | | | | | 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.
* Introduce TaskOnceAnthony Ramine2017-09-206-35/+38
| | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* Rename Task to TaskBoxAnthony Ramine2017-09-206-16/+16
|
* Make Task require SendAnthony Ramine2017-09-206-8/+11
|
* Use task! to notify performance observersAnthony Ramine2017-09-181-21/+7
|
* Move Task to its own moduleAnthony Ramine2017-09-186-6/+8
|
* Introduce MainThreadScriptMsg::DispatchJobQueueAnthony Ramine2017-09-171-16/+0
| | | | This removes the last remaining use of Task::run_with_script_thread
* Send AsyncJobHandler as a MainThreadTaskAnthony Ramine2017-09-161-0/+16
|
* Remove FileReadingRunnableAnthony Ramine2017-09-161-15/+3
|
* Rename Runnable to TaskAnthony Ramine2017-09-166-70/+83
| | | | | | | | | | | | 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`.
* Reformat some task-related functionsAnthony Ramine2017-09-082-10/+16
|
* Kill UserInteractionTaskAnthony Ramine2017-09-081-17/+7
| | | | Just use a bare Runnable value.
* Kill DOMManipulationTaskAnthony Ramine2017-09-081-17/+7
| | | | Just use a bare Runnable value.
* Kill Runnable::is_cancelled ⚔️Anthony Ramine2017-09-072-6/+2
|
* Make Performance Timeline API work in WorkersFernando Jiménez Moreno2017-09-051-26/+38
|
* order derivable traits listsClément DAVID2017-08-233-3/+3
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Performance Timeline APIFernando Jiménez Moreno2017-08-172-0/+59
|
* Added Debug implementations.Alan Jeffrey2017-06-132-0/+26
|
* Properly implement TaskSource for NetworkingTaskSourceKeith Yeung2016-11-111-9/+22
|
* Update to string-cache 0.3Simon Sapin2016-11-032-2/+2
|
* Make TaskSource::queue take a &GlobalScopeAnthony Ramine2016-10-063-8/+8
|
* Introduce GlobalScope::get_runnable_wrapperAnthony Ramine2016-10-061-1/+1
|
* Implement file reading task sourceKeith Yeung2016-07-141-9/+62
| | | | And remove superfluous FileReaderEvent enum
* Make task queue API usable from non-main threads.Josh Matthews2016-07-143-12/+29
|
* Move boxing to runnable initializationConnor Brewster2016-07-133-6/+6
|
* Make all task source runnables cancellableConnor Brewster2016-07-133-15/+23
| | | | Implement all Runnable methods on CancellableRunnable to redirect to their inner runnable