Commit graph

268 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
Naveen Gattu
a48a111cee Upgrade Hyper 2022-01-16 09:34:17 -08: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
Dominic Cooney
30c5ad95d5 Mark dead BrowsingContextActor fields with underscores.
Signed-off-by: Dominic Cooney <dominic.cooney@gmail.com>
2021-05-23 19:27:57 +09:00
Simon Sapin
a0d9f97c8e Fix warnings introduced in newer Rust Nightly
This does not (yet) upgrade ./rust-toolchain

The warnings:

* dead_code "field is never read"
* redundant_semicolons "unnecessary trailing semicolon"
* non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021"
* unstable_name_collisions "a method with this name may be added to the standard library in the future"
* legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
2021-02-25 15:36:03 +01:00
Sudarsan
9048185a10 Returns fake preferences if PrefValue::Missing.
If the pref_map().get() enum returns PrefValue::Missing, then
fake values are returned just like before.
2020-09-12 21:57:08 +08:00
Sudarsan
c8d911817f preferences actor now returns real values.
The preferences actor was previously returning mock values. This changes
picks up the pref_values from the pref_map which is global preferences
state and returns values from there.
2020-09-12 18:55:11 +08:00
Josh Matthews
27974457cd Disable as many broken devtools panels as possible. 2020-08-10 23:48:28 -04:00
Josh Matthews
f4915ef6c9 devtools: Track multiple clients better, and cleanup streams when a client isn't reachable. 2020-08-06 09:55:01 -04:00
Josh Matthews
0b619bf920 devtools: Don't panic when sending to a disconnected client fails. 2020-08-05 14:55:48 -04:00
mustafapc19
d8b6755a8d Console.Clear implemented 2020-07-29 22:19:18 +05:30
Paul Rouget
2c36754bf7 Configure devtools server via preferences 2020-07-17 08:31:26 +02:00
Paul Rouget
da80d4ff01 devtools: TabDescription actor 2020-07-13 09:21:27 +02:00
Paul Rouget
8cf2f14baa Allow embedder to bypass devtools prompt 2020-06-22 11:47:03 +02:00
Alex Touchet
d132866c5d
More Cargo.toml cleanups 2020-05-14 22:20:18 -07:00
Josh Matthews
02ce6188aa Update devtools page titles. 2020-04-28 15:40:38 -04:00
Josh Matthews
b53ce5c79a Ignore eager JS evaluation in devtools. 2020-04-28 15:40:02 -04:00
Josh Matthews
3dfec95268 Update browsing context title/url when navigating. 2020-04-28 12:23:34 -04:00
Josh Matthews
b9bf9f873b Move some console-related message types into the console code. 2020-04-28 11:07:45 -04:00
Josh Matthews
565e9432c6 Support connecting to worker globals from remote devtools. 2020-04-28 11:07:45 -04:00
Josh Matthews
bce4ec5b70 Support clearing cached events in console actor. 2020-04-26 18:11:23 -04:00
Josh Matthews
7c48644cad Support navigating browsing contexts in the devtools.
Break the association between pipelines and browsing context actors.
Now there is one browsing context actor per actual browsing context,
and individual actors keep track of known pipelines as necessary.
There is also one console/performance/timeline/inspector/etc. actor
per browsing context.

This also centralizes more information in the browsing context actor.
Rather than duplicating state for the active pipeline in actors that
need to use it, each actor now remembers the name of its associated
browsing context actor and obtains that state whenever it's necessary.
2020-04-26 18:11:23 -04:00
Kunal Mohan
94db0d61cb
Add support for launching devtools server on random port
Assign random port to devtools server in case user does not specify a
port explicitly and report it to the embedding layer for display to user.
2020-03-16 15:30:26 +05:30
Josh Matthews
3fd3c23e17 Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
Paul Rouget
49376e3b31 Prompt user before accepting incoming devtools connection 2020-02-10 06:51:18 +01:00
Simon Sapin
fdcc7653f2 Fix some warnings in future Rust nightlies 2020-01-02 19:22:03 +01:00
Josh Matthews
84074d3c86 Update devtools server for Firefox 71. 2019-12-13 17:02:35 -05:00
Paul Rouget
b3b886e837 devtools: save and send cached messages 2019-12-06 10:10:43 +01:00
Anthony Ramine
785a344e32 Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
Shotaro Yamada
b228d2700e Remove unused dependencies 2019-10-01 21:15:53 +09:00
Bastien Orivel
92161ecfbc Update ipc-channel and related dependencies 2019-08-27 23:44:04 +02:00
Josh Matthews
b1510d9ad5 Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00
codehag
8d8f48242a Introduce EvaluateJSAsync method and evaluationResponse event 2019-05-07 18:16:04 +02:00
Shotaro Yamada
c44a2febe6 Remove redundant .clone()s 2018-12-11 10:43:51 +09:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +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
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
9f9bf8f6bc Switch most crates to the 2018 edition 2018-11-06 16:12:04 +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
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
codehag
9ccf7c0a57 DevTools - add Emulation Actor 2018-10-15 08:48:30 +02:00
bors-servo
5327758b9b
Auto merge of #21944 - codehag:devtools-add-thread-interrupt, r=jdm
DevTools - add Interrupt method to ThreadActor

This is one of three pull requests that allows the DevTools Debugger to render.

The two related prs are #21942 and #21943

In this pr, I introduced the `interrupt` method to the threadActor. This is arguably a carry-over from the firefox devtools, where the debugger server is running in the same event loop as the content scripts, and it can only update itself when the debugger server is paused. Depending on how debugging is, or how debugging will be implemented on servo, this method may need to be adjusted for "debugger events" and "script events".

After all three patches on this topic are merged, you should be able to see the debugger \o/ (but no sources yet)

<img width="900" alt="screen shot 2018-10-14 at 16 57 07" src="https://user-images.githubusercontent.com/26968615/46918408-35f30180-cfd2-11e8-9a98-8e1540adc894.png">

---
<!-- 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 #__ (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/21944)
<!-- Reviewable:end -->
2018-10-14 16:14:40 -04:00
bors-servo
4dcd1e71fa
Auto merge of #21943 - codehag:devtools-add-list-workers-method, r=jdm
DevTools - add ListWorkers method to BrowsingContextTargetActor

This is one of three pull requests that allows the DevTools Debugger to render.

The two related prs are #21942 and #21944

This pr introduces a `ListWorkers` method, which the debugger relies on for startup. At the moment, we are returning an empty array, but later on we can return an array populated by all workers associated with a target.

---
<!-- 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 #__ (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/21943)
<!-- Reviewable:end -->
2018-10-14 15:07:01 -04:00
bors-servo
a59bcd6749
Auto merge of #21942 - codehag:devtools-add-device-actor, r=jdm
DevTools - add DeviceActor and update Root to own global actors

This is one of three pull requests that allows the DevTools Debugger to render. This pr also introduces global actors to the root actor, the same as exists in FF devtools. At a later point I would like to reorganize this.

The two related prs are #21943 and #21944

This is the most significant change of the three. It introduces both Device and Performance as global actors, and leaves the Performance actor also as a target actor. It also introduces the concept of ownership to the root actor, with regards to the two Global Actors.

The Device actor as added to allow the JS Debugger to start up. This required the DeviceActor's `getDescription` method. `getDescription`, in the case of servo, returns a couple of basic fields that the debugger is interested in but doesn't use, specifically `apptype` -- which is returning a fake value of `servo`, and the version number `63.0`.

The version number is interesting because devtools has [dropped support for any versions below 2 version numbers from the current firefox](https://searchfox.org/mozilla-central/rev/3a54520d8d2319a4116866371ed3d9ed2ec0cc2b/devtools/client/debugger/new/src/client/firefox/commands.js#398).

This means that if we want the servo server to be supported, we will need to keep this number synced with FF's versioning. It isn't great, but hopefully we can introduce a different approach later on.

---
<!-- 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 #__ (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/21942)
<!-- Reviewable:end -->
2018-10-14 14:17:51 -04:00
codehag
61d31a5494 fix lint issues 2018-10-14 19:31:26 +02:00
codehag
8d738f6499 remove any fields that are not totally necessary 2018-10-14 17:04:33 +02:00