Commit graph

197 commits

Author SHA1 Message Date
Alan Jeffrey
74c1e00d81 Upgraded to SM 60 2018-08-20 18:22:29 -04:00
Gregory Terzian
baef63becd use remote-event task source in EventSource 2018-07-13 13:56:46 +08:00
Anthony Ramine
73b5bf201f Implement WindowOrWorkerGlobalScope.origin
The test document_domain_setter.html now fails, but AFAIK the origin
comparison can never be true (document.origin is the unprefixed domain,
while the loaded iframe is from www1.…), and that test fails in all
major browsers because of security exceptions anyway.
2018-04-27 16:41:19 +02:00
Marcin Mielniczuk
356c57e628 Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00
ddh
0a09ee5cd8 changed f64 to u64 for navigation start timing until it had to be float 2017-11-01 20:45:22 +00:00
bors-servo
e438b094f6 Auto merge of #18670 - avadacatavra:interactive-metrics, r=jdm
added time to interactive metrics

<!-- Please describe your changes on the following line: -->

Added time to interactive metrics and refactored metrics/lib

I need to write tests, but wanted to submit the PR for review

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18670)
<!-- Reviewable:end -->
2017-10-25 15:53:57 -05: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
Keith Yeung
c6bb1cb9d5 Merge request type and destination 2017-10-23 11:19:35 -07:00
Josh Matthews
c075372739 Do not trace Rust values when thread is shutting down. 2017-10-20 13:50:40 -04:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11: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
c52fd0a780 Rename MutNullableJS<T> to MutNullableDom<T> 2017-09-26 09:49:02 +02:00
Anthony Ramine
0e3c54c191 Rename dom::bindings::js to dom::bindings::root 2017-09-26 02:19:05 +02:00
Anthony Ramine
52527d6f9d Rename Task to TaskBox 2017-09-20 10:07:29 +02:00
Anthony Ramine
46628fba05 Move Task to its own module 2017-09-18 02:47:04 +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
35d86afcc8 Simplify WorkerGlobalScope::process_event
This method does not need to dispatch to interfaces derived from
WorkerGlobalScope, given they end up doing exactly the same thing
in all workers.
2017-09-14 13:37:33 +02:00
Anthony Ramine
24cf15a014 Store microtask queues in their global (fixes #18467) 2017-09-13 15:02:45 +02:00
Anthony Ramine
7f9f95b7ce Store microtask queues in Rc<T> 2017-09-13 14:27:42 +02:00
Anthony Ramine
3764217ca6 Reformat WorkerGlobalScope::new_inherited 2017-09-13 10:53:01 +02:00
Fernando Jiménez Moreno
fb843c251a Make Performance Timeline API work in Workers 2017-09-05 17:07:15 +02:00
Anthony Ramine
7875fea6cf Use absolute paths in the event handlers macros 2017-09-01 11:54:09 +02:00
Paul Rouget
d241389129 make use of ScriptToConstellationChan 2017-08-15 08:22:09 +02:00
Fausto Núñez Alberro
6032940fb8 Change RequestInit origin type to ImmutableOrigin 2017-07-16 21:44:33 +02:00
ddh
2c6bd51bef added origin to globalscope 2017-04-24 13:15:42 +01:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Ms2ger
f7e2f0e641 Use RootedTraceableBox for dictionaries. 2017-02-16 11:03:26 +01:00
Josh Matthews
32d4f84a30 Generalize promise job queue into solitary microtask queue. 2017-02-01 12:54:33 -05:00
Ms2ger
cb47a7e403 Implement the entry global.
Partial fix for #10963.
2017-01-06 12:56:35 +01:00
Anthony Ramine
1327ebd52f Remove HeapGCValue
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Ms2ger
e367822b3e Update js. 2016-11-27 12:19:19 +01:00
bors-servo
22aebdf5d4 Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon

<!-- Please describe your changes on the following line: -->

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14246)
<!-- Reviewable:end -->
2016-11-17 15:34:47 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Abelardo E. Mendoza
b372e7c98f script creates methods taking '*mut JSContext' unsafe
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01:00
Keith Yeung
72cb856e31 Properly implement TaskSource for NetworkingTaskSource 2016-11-11 14:50:42 -08:00
Ms2ger
c3c6df69b4 Rewrite load_whole_resource using the fetch stack. 2016-11-02 16:15:27 +01:00
Anthony Ramine
c66cf46bee Make the closure in flush_promise_jobs return a Root<GlobalScope> 2016-10-06 21:35:59 +02:00
Anthony Ramine
1f8bb3a89f Make Fetch take a &GlobalScope 2016-10-06 21:35:55 +02:00
Anthony Ramine
2ee073053a Make PromiseJobQueue::enqueue take a &GlobalScope 2016-10-06 21:35:53 +02:00
Anthony Ramine
ca8c6fb072 Make RunnableWrapper store an Option<Arc<AtomicBool>>
This makes WorkerGlobalScope::get_runnable_wrapper not panic anymore
when the worker is a ServiceWorkerGlobalScope.
2016-10-06 21:35:51 +02:00
Anthony Ramine
991801488c Move timers to GlobalScope 2016-10-06 21:35:51 +02:00
Anthony Ramine
83feb7dee3 Make prepare_workerscope_init take a &GlobalScope 2016-10-06 21:35:47 +02:00
Anthony Ramine
bad49e4696 Introduce GlobalScope::resource_threads 2016-10-06 21:35:46 +02:00
Anthony Ramine
86d2008137 Introduce GlobalScope::report_an_error 2016-10-06 21:35:46 +02:00
Anthony Ramine
27f100b1d4 Introduce GlobalScope::pipeline_id 2016-10-06 20:59:13 +02:00
Anthony Ramine
c6ff767625 Introduce GlobalScope::scheduler_chan 2016-10-06 20:59:13 +02:00
Anthony Ramine
f789e73fd2 Introduce GlobalScope::constellation_chan 2016-10-06 20:59:12 +02:00
Anthony Ramine
ae3763e7b3 Introduce GlobalScope::time_profiler_chan 2016-10-06 20:59:12 +02:00