Repository navigation
Conversation
|
We should be able to write a test that exercises this. Starting in an unmodified main branch, you can make a new test in tests/wpt/tests/eventsource/ that's based on eventsource-reconnect.window.js and uses createObjectURL to create a blob URL and revoke the blob URL from inside the onopen event handler. I would expect the test to fail when it attempts to reconnect to the URL since it would no longer be valid; this PR should allow it to pass. |
|
Please don't use the "update branch" button: https://book.servo.org/contributing/making-a-pull-request.html?#addressing-merge-conflicts |
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#63763) with upstreamable changes. |
|
@jdm I've completed the EventSource fix and added a WPT test file (tests/wpt/tests/eventsource/eventsource-blob-url.js) that covers: Basic blob URL functionality with EventSource |
|
🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync. |
|
You will need to rebase this branch to strip out the merge commit, since it prevents our automated syncing with the upstream WPT repository. |
e2758ea to
699694f
Compare
|
🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync. |
699694f to
f9c725c
Compare
f9c725c to
ca64c9d
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#63763). |
|
Also rebased to a single clean commit with no merge commit |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#63763). |
|
Fixed the WPT test: URL.revokeObjectURL(url) now happens immediately after creating the EventSource, before any events fire. This is the correct test for the fix , the blob claim keeps the URL alive even after it's been revoked. |
| @@ -0,0 +1,15 @@ | |||
| // META: title=EventSource: blob URL | |||
There was a problem hiding this comment.
We're missing changes to MANIFEST.json. Make sure you've run ./mach update-manifest.
There was a problem hiding this comment.
Updated , added the MANIFEST.json changes. Single clean commit with no merge commits, ready for re-review.
ca64c9d to
6ace984
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#63763). |

Use ensure_blob_referenced_by_url_is_kept_alive to claim the blob URL in EventSource, and switch from create_a_potential_cors_request to create_a_potential_cors_request_with_claim. Without the claim, a page that revokes a blob URL right after creating an EventSource could have a fetch fail because the blob entry would already be gone.
Testing: A full WPT run on my fork showed no changes in the test results here
Part of #48892