Merged
Conversation
Contributor
Author
Member
This makes sense; unfortunately I was counting on removing it in order to identify the other uses that need to be updated. |
Rather than sharing the full image cache in a script_thread,
the image cache is now unique per document. This ensures that
CSP factors no longer affect whether the image is retrieved
from the cache incorrectly.
To do so, the thread_pool is shared across all caches, but the
store is fresh. Except for the place_holder{image,url}, which
are cloned. That's because the `rippy_data` is only available
in the constellation and no longer accessible at the point
that we need to create the document in the script_thread.
Contrary to the description in servo#36505, the script_thread still
has an image_cache for this reason: so it has access to
the store and thread_pool to clone it.
With these changes, the two CSP tests no longer flake. Confirmed
with running the following commmand:
```
./mach test-wpt tests/wpt/tests/content-security-policy/generic/ --rerun=10
```
Fixes servo#36505
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
e5fd0b3 to
e6c9754
Compare
Contributor
Author
|
Done (I think)! https://github.com/TimvdLippe/servo/actions/runs/14824629323 |
This was referenced May 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rather than sharing the full image cache in a script_thread, the image cache is now unique per document. This ensures that CSP factors no longer affect whether the image is retrieved from the cache incorrectly.
To do so, the thread_pool is shared across all caches, but the store is fresh. Except for the place_holder{image,url}, which are cloned. That's because the
rippy_datais only available in the constellation and no longer accessible at the point that we need to create the document in the script_thread.Contrary to the description in #36505, the script_thread still has an image_cache for this reason: so it has access to the store and thread_pool to clone it.
With these changes, the two CSP tests no longer flake. Confirmed with running the following commmand:
Fixes #36505