Use surfman-chains from crates.io
<!-- 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: -->
- [ ] `./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. -->
Improve winit/mach segfault output
This patch improves the output that you see when the winit port segfaults, especially when the segfault happens on a layout or script thread, by making two changes to our crash handler and one change to mach.
* we make the crash handler use stderr instead of stdout, because [std::io::stdout](https://doc.rust-lang.org/std/io/fn.stdout.html) allocates when first called, which will often cause a second segfault
* we make the crash handler reraise the signal to terminate abnormally, allowing mach to distinguish it from exiting normally with the same status code as a signal number
* we make mach print different messages for whether the process terminated by signal or exited normally
You can try this yourself by running servo with the following patch:
```diff
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index ac1a7fe21e..77c4c9d087 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -589,6 +589,7 @@ impl LayoutThread {
rw_data: &rw_data,
possibly_locked_rw_data: &mut possibly_locked_rw_data,
};
+ unsafe { std::ptr::read::<usize>(std::ptr::null()); }
while self.handle_request(&mut rw_data) {
// Loop indefinitely.
}
```
Before:
```
$ ./mach run -d about:blank
[should print “Stack trace for "Layout(1,1)"” here, but segfaults]
Servo exited with return value 11
```
After:
```
$ ./mach run -d about:blank
Caught signal 11 in thread "Layout(1,1)"
[should ideally print backtrace here, but segfaults]
Servo was terminated by signal 11
```
---
<!-- 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
- [x] These changes fix#29442
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it would be impractical to test them
(r? @jdm, @SimonSapin based on git log for crash handler)
Bump tempfile from 3.3.0 to 3.4.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Stebalien/tempfile/blob/master/NEWS">tempfile's changelog</a>.</em></p>
<blockquote>
<h1>3.4.0</h1>
<p>SECURITY: Prior <code>tempfile</code> releases depended on <code>remove_dir_all</code> version 0.5.0 which was vulnerabiel to a <a href="https://github.com/XAMPPRocky/remove_dir_all/security/advisories/GHSA-mc8h-8q98-g5hr">TOCTOU race</a>. This same race is present in rust versions prior to 1.58.1.</p>
<p>Features:</p>
<ul>
<li>Generalized temporary files: <code>NamedTempFile</code> can now abstract over different kinds of files (e.g.,
unix domain sockets, pipes, etc.):
<ul>
<li>Add <code>Builder::make</code> and <code>Builder::make_in</code> for generalized temp file
creation.</li>
<li>Add <code>NamedTempFile::from_parts</code> to complement <code>NamedTempFile::into_parts</code>.</li>
<li>Add generic parameter to <code>NamedTempFile</code> to support wrapping non-File types.</li>
</ul>
</li>
</ul>
<p>Bug Fixes/Improvements:</p>
<ul>
<li>Don't try to create a temporary file multiple times if the file path has been fully specified by
the user (no random characters).</li>
<li><code>NamedTempFile::persist_noclobber</code> is now always atomic on linux when <code>renameat_with</code> is
supported. Previously, it would first link the new path, then unlink the previous path.</li>
<li>Fix compiler warnings on windows.</li>
</ul>
<p>Trivia:</p>
<ul>
<li>Switch from <code>libc</code> to <code>rustix</code> on wasi/unix. This now makes direct syscalls instead of calling
through libc.</li>
<li>Remove <code>remove_dir_all</code> dependency. The rust standard library has optimized their internal version
significantly.</li>
<li>Switch to official windows-sys windows bindings.</li>
</ul>
<p>Breaking:</p>
<ul>
<li>The minimum rust version is now <code>1.48.0</code>.</li>
<li>Mark most functions as <code>must_use</code>.</li>
<li>Uses direct syscalls on linux by default, instead of libc.</li>
<li>The new type parameter in <code>NamedTempFile</code> may lead to type inference issues in some cases.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/Stebalien/tempfile/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bump pest from 2.1.3 to 2.5.5
Bumps [pest](https://github.com/pest-parser/pest) from 2.1.3 to 2.5.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/pest-parser/pest/commits/v2.5.5">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Bump arrayvec from 0.5.1 to 0.5.2
Bumps [arrayvec](https://github.com/bluss/arrayvec) from 0.5.1 to 0.5.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/bluss/arrayvec/blob/master/CHANGELOG.md">arrayvec's changelog</a>.</em></p>
<blockquote>
<h2>0.5.2</h2>
<ul>
<li>Add <code>is_empty</code> methods for ArrayVec and ArrayString by <a href="https://github.com/nicbn"><code>@nicbn</code></a></li>
<li>Implement <code>TryFrom<Slice></code> for ArrayVec by <a href="https://github.com/paulkernfeld"><code>@paulkernfeld</code></a></li>
<li>Add <code>unstable-const-fn</code> to make <code>new</code> methods const by <a href="https://github.com/m-ou-se"><code>@m-ou-se</code></a></li>
<li>Run miri in CI and a few related fixes by <a href="https://github.com/RalfJung"><code>@RalfJung</code></a></li>
<li>Fix outdated comment by <a href="https://github.com/Phlosioneer"><code>@Phlosioneer</code></a></li>
<li>Move changelog to a separate file by <a href="https://github.com/Luro02"><code>@Luro02</code></a></li>
<li>Remove deprecated <code>Error::description</code> by <a href="https://github.com/AnderEnder"><code>@AnderEnder</code></a></li>
<li>Use pointer method <code>add</code> by <a href="https://github.com/hbina"><code>@hbina</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d336f8c5c5"><code>d336f8c</code></a> 0.5.2</li>
<li><a href="50c9ed1abd"><code>50c9ed1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/bluss/arrayvec/issues/166">#166</a> from hbina/use_add_instead_of_offset</li>
<li><a href="92867bb118"><code>92867bb</code></a> Use add instead of offset to avoid casting to isize.</li>
<li><a href="fdeed2d09d"><code>fdeed2d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/bluss/arrayvec/issues/161">#161</a> from fusion-engineering-forks/const-new</li>
<li><a href="fe70c23e94"><code>fe70c23</code></a> Add unstable-const-fn feature to make new() functions const.</li>
<li><a href="4043c58de7"><code>4043c58</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/bluss/arrayvec/issues/159">#159</a> from paulkernfeld/try-from-slice</li>
<li><a href="675e992741"><code>675e992</code></a> allow items that implement Clone</li>
<li><a href="488efd0b3e"><code>488efd0</code></a> impl<A: Array> TryFrom<&[A::Item]> for ArrayVec<A></li>
<li><a href="04a3559eea"><code>04a3559</code></a> FIX: travis link in readme</li>
<li><a href="491e2ae621"><code>491e2ae</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/bluss/arrayvec/issues/152">#152</a> from Luro02/readme</li>
<li>Additional commits viewable in <a href="https://github.com/bluss/arrayvec/compare/0.5.1...0.5.2">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Ensure winit windows are cleaned up before TLS disappears.
Since the winit update, closing Servo on macOS can lead to a crash. This is because winit panics while trying to clean up the window, since it requires the TLS to be available. Right now this code doesn't run until Servo's TLS is being destroyed. There's no reason to use a thread local value to store the window information, however, and moving it into the App object avoids the panic.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because we don't run non-headless tests on macOS.
Fix the build URL send to the intermittent dashboard
This URL contained a spurious ")".
<!-- 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
- [x] These changes do not require tests because they simply change the CI scripts.
<!-- 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. -->
Fix Windows startup crash
Updates mozjs to address crashes around off-thread script compilation.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#29404 and fix#29214.
- [x] These changes do not require tests because we don't run tests in CI in the affected configurations (Windows and debug-mozjs)
General quick check for PRs and forks.
Pull request workflow was changed to more general Quick check workflow that is meant to be run on PR and all branches not covered by main workflow.
BONUS: I used [xvfb-run](https://manpages.ubuntu.com/manpages/xenial/man1/xvfb-run.1.html) to enable smoketest on Linux.
---
<!-- 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
- [x] These changes are partial fix for #29379
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there are only CI changes
<!-- 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. -->
De-dupe mio 0.7
<!-- 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: -->
- [ ] `./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. -->
Switch to immeta fork to remove arrayvec dupe
<!-- Please describe your changes on the following line: -->
The original immeta crate is archived (https://github.com/netvl/immeta) so I forked it, updated it to newer crates and edition 2021. No public api change.
---
<!-- 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
- [X] These changes do not require tests because just fighting dupes
<!-- 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. -->
De-dupe wasi 0.10
<!-- 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: -->
- [ ] `./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. -->
Switch to the sha2 crate for SRI digests.
This removes one (simple) use of OpenSSL
The update of `content-security-policy` ensures that we don't add a duplicate sha2 crate.
---
<!-- 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
- [X] These changes do not require tests because it's a refactoring, no behavior change expected.
<!-- 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. -->
De-dupe miniz_oxide 0.5
<!-- 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: -->
- [ ] `./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. -->
Do not run specialized workflow on forks
Per #29379 to make GitHub actions more fork-friendly.
I have not decided yet on how to handle main workflow, as I started to like my `git push origin HEAD:try --force` workflow, but using CI on all forks branches would also help enforce the [rule](https://github.com/servo/servo/blob/master/CONTRIBUTING.md#pull-request-checklist):
> Commits should be as small as possible, while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests).
---
<!-- 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
- [x] These changes partially fix#29379
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it is only CI stuff
<!-- 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. -->
Bump winit to 0.28.1
This fixes the following wayland-client error:
Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
<!-- 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
- [X] These changes fix#27740 (GitHub issue number if applicable)
<!-- Either: -->
- [x] There are tests for these changes OR
- [X] These changes do not require tests because only dependencies are updated.
<!-- 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. -->
Commit a5824ed (servo/webxr#203) bumped surfman to 0.6. This commit
bumps servo's webxr dep, letting all servo deps use the same version of
surfman and winit.