RELEASE ASSERT: http/tests/security/contentSecurityPolicy/multipart-three-part.py is a flaky crash#64646
Merged
webkit-commit-queue merged 1 commit intoMay 13, 2026
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 686699e) Details |
686699e to
7c3e2a7
Compare
Collaborator
|
EWS run on previous version of this PR (hash 7c3e2a7) Details
|
7c3e2a7 to
f9b30dc
Compare
Collaborator
|
EWS run on previous version of this PR (hash f9b30dc) Details
|
f9b30dc to
67dff1a
Compare
Collaborator
|
EWS run on current version of this PR (hash 67dff1a) Details
|
Contributor
|
Looks like a Swift failure on watchOS: |
beidson
approved these changes
May 12, 2026
brentfulgham
approved these changes
May 12, 2026
| if (m_responseCompletionHandler) | ||
| m_responseCompletionHandler(PolicyAction::Use); | ||
| if (!m_responseCompletionHandlers.isEmpty()) | ||
| m_responseCompletionHandlers.takeFirst()(PolicyAction::Use); |
Contributor
There was a problem hiding this comment.
I do wonder if we will ever need to move to a model where we get a specific completion handler to match with a specific response. But I think this is correct (and certainly an improvement over existing).
…hree-part.py is a flaky crash https://bugs.webkit.org/show_bug.cgi?id=314243 rdar://169360779 Reviewed by Brent Fulgham and Brady Eidson. http/tests/security/contentSecurityPolicy/multipart-three-part.py is flaky because NetworkResourceLoader::didReceiveResponse() sometimes overwrites m_responseCompletionHandler before the previous one has been called, hitting the CompletionHandler destructor assertion. For a multipart/x-mixed-replace main resource, the network layer can deliver follow-up parts via didReceiveResponse() before the WebProcess has answered ContinueDidReceiveResponse for the first part. The first part's round-trip is async because it goes through DocumentLoader::responseReceived() -> checkContentPolicy(), which IPCs to the UIProcess. Assigning the new completion handler over the still- pending one destroyed it without invoking it, asserting in CompletionHandler's destructor. Replace the single m_responseCompletionHandler with a Deque so each incoming response queues its own handler, and each ContinueDidReceive- Response IPC drains the front of the queue. This mirrors the WebProcess flow (it processes each part in order, sending one ContinueDidReceive- Response per approved part), so per-part validation is preserved. On loader teardown / convertToDownload, any remaining handlers are drained with PolicyAction::Ignore. No new tests, covered by existing test. * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::convertToDownload): (WebKit::NetworkResourceLoader::transferToNewWebProcess): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::continueDidReceiveResponse): * Source/WebKit/NetworkProcess/NetworkResourceLoader.h: Canonical link: https://commits.webkit.org/313118@main
67dff1a to
071edf4
Compare
Collaborator
|
Committed 313118@main (071edf4): https://commits.webkit.org/313118@main Reviewed commits have been landed. Closing PR #64646 and removing active labels. |
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.
🧪 gtk-wk2
🛠 ios-apple
071edf4
67dff1a