Commit graph

56 commits

Author SHA1 Message Date
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
2023-05-17 11:59:35 +02:00
Martin Robinson
c021df027a Fix some build warnings
- Mark some instances of unused fields and variables as as allowed,
  when they are used for memory management.
- Remove the use of some deprecated function.s

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-01-11 12:50:36 +01:00
yvt
41b3726271 feat: shorten thread names
The Linux kernel imposes a 15-byte limit on thread names[1]. This means
information that does not fit in this limit, e.g., the pipeline ID of
layout and script threads, is lost in a debugger and profiler (see the
first column of the table below).

This commit shortens the thread names used in Servo to maximize the
amount of information conveyed. It also rectifies some inconsistencies
in the names.

|       Before      |       After       |
|-------------------|-------------------|
| `BluetoothThread` | `Bluetooth`       |
| `CanvasThread`    | `Canvas`          |
| `display alert d` | `AlertDialog`     |
| `FontCacheThread` | `FontCache`       |
| `GLPlayerThread`  | `GLPlayer`        |
| `HTML Parser`     | `Parse:www.examp` |
| `LayoutThread Pi` | `Layout(1,1)`     |
| `Memory profiler` | `MemoryProfiler`  |
| `Memory profiler` | `MemoryProfTimer` |
| `OfflineAudioCon` | `OfflineACResolv` |
| `PullTimelineMar` | `PullTimelineDat` |
| `ScriptThread Pi` | `Script(1,1)`     |
| `WebWorker for h` | `WW:www.example.` |
| `ServiceWorker f` | `SW:www.example.` |
| `ServiceWorkerMa` | `SvcWorkerManage` |
| `Time profiler t` | `TimeProfTimer`   |
| `Time profiler`   | `TimeProfiler`    |
| `WebGL thread`    | `WebGL`           |
| `Choose a device` | `DevicePicker`    |
| `Pick a file`     | `FilePicker`      |
| `Pick files`      | `FilePicker`      |

[1]: https://stackoverflow.com/questions/5026531/thread-name-longer-than-15-chars
2021-07-19 00:57:48 +09:00
Emilio Cobos Álvarez
31e8e418ea Miscellaneous build / tidy fixes. 2021-02-26 17:53:55 +01:00
Utsav Oza
310821d3b0 Update referrer computation
Update unit tests for determine_requests_referrer

Update wpt metadata

Add missing spec links
2020-07-02 14:29:26 +05:30
Emilio Cobos Álvarez
332aec212c style: Miscellaneous servo build fixes. 2020-06-04 01:50:36 +02:00
atouchet
ca30ec02fc More Cargo.toml updates 2020-05-31 08:55:28 -07:00
Alexandrov Sergey
357b486455 make is_origin_trustworthy a method of ServoUrl + fix localhost handling 2020-05-19 20:06:59 +03:00
Anthony Ramine
785a344e32 Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
Josh Matthews
a241232c2b Add useful debug output for HTTP response and image cache. 2019-10-04 15:08:40 -04:00
Josh Matthews
81a67aed9e Double key image cache by requesting origin, and store CORS status with cached images. 2019-10-04 09:22:21 -04:00
Shotaro Yamada
b228d2700e Remove unused dependencies 2019-10-01 21:15:53 +09:00
Simon Sapin
9392180007 Update to url 2.0 2019-08-17 10:03:44 +02:00
Emilio Cobos Álvarez
49842f5031 style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
bors-servo
07d53e32c4
Auto merge of #22740 - Hyperion101010:master, r=jdm
Truncate debug output for long data URLs #22485

  I tried to solve the patch, here i did what you told but i am not getting the
  exact result after the build can you take a look

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

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

<!-- Either: -->
- [x] There are tests for these changes OR
- [x] 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/22740)
<!-- Reviewable:end -->
2019-01-28 15:56:29 -05:00
Josh Matthews
21e10b201a
Don't convert hash to string. 2019-01-28 15:56:13 -05:00
Josh Matthews
4168227382
Use hex for debug url hash. 2019-01-28 15:13:45 -05:00
hyperion101010
abc5b2a5bc Truncate long URLs when doing debug prints
I added the required changes on debug in lib.rs file, you can have a review
2019-01-29 01:38:30 +05:30
Emilio Cobos Álvarez
122f8ed1bb Update references to malloc_size_of_derive, which is in crates.io now. 2019-01-13 21:59:31 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
36c4208f22 Update uuid 2018-11-09 21:04:31 +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
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
9f9bf8f6bc Switch most crates to the 2018 edition 2018-11-06 16:12:04 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Bastien Orivel
a97ba4f57d Remove Origin::unicode_serialization
Fixes #20701
2018-10-12 10:25:03 +02:00
chansuke
812d4a479a Format component of url 2018-09-05 22:53:03 +09:00
Simon Sapin
e7e52d855b Fix building servo_url by itself
Fix #20664
2018-04-19 17:01:14 +02:00
Bastien Orivel
570d865065 Bump ipc-channel and bincode
This required bumping uuid too which unfortunately duplicated rand.
2018-03-21 13:05:47 +01: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
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07: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
Ting-Yu Lin
585c00f235 style: Introduce Chrome UI privilege for parsers
The motivation is that Chrome XBL stylesheets can be parsed under author
level, but we allow some event-state pseudo classes like
:-moz-handled-clicktoplay to be used.

Also synchronize the privilege of pseudo classes in
non_ts_pseudo_class_list.rs and nsCSSPseudoClassList.h (except :fullscreen).

MozReview-Commit-ID: 8fUjjC8hbQO
2017-08-03 16:30:08 +08:00
Simon Sapin
316cd35767 Untry 2017-06-18 13:21:51 +02:00
Simon Sapin
605ef8b7ec Remove explicit dependencies on serde_derive 2017-06-16 13:58:21 +02:00
Bastien Orivel
76d8573393 Bump serde to 1.0 2017-06-16 13:31:18 +02:00
Bastien Orivel
0a254b0306 Bump euclid to 0.13 and heapsize to 0.4 2017-06-05 19:28:39 +02:00
Xidorn Quan
817172ebc4 Remove servo feature from servo_url 2017-04-07 17:51:49 +10:00
Anthony Ramine
54d37d920c Remove some useless Option<T> wrappers from ServoUrl methods 2017-03-26 16:15:06 +02:00
Anthony Ramine
bba0be13dd Make ServoUrl::as_url return a &Url 2017-03-23 15:37:32 +01:00
Alan Jeffrey
1f61a549a3 Added some same-origin-domain checks. 2017-03-14 14:36:03 -05:00
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
Anthony Ramine
fe3f4ff0c2 Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
Anthony Ramine
26d6c96b18 Reorder some dependencies 2017-02-18 16:42:20 +01:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
Ms2ger
ce496472f8 Omit the 'ServoUrl()' wrapping in ServoUrl's Debug implementation. 2017-01-18 15:43:29 +01:00
Manish Goregaokar
b4a83b6cec CSSOM bits for @supports: CSSConditionRule and CSSSupportsRule, with conditionText attribute 2017-01-07 23:17:52 -08:00
Simon Sapin
67aea3bba4 Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
Alan Jeffrey
78c87ea8d7 Implement discarding Document objects to reclaim space. 2017-01-04 11:29:31 +00:00