fix: unblock service-worker registration block after worker-buffer change#3506
Open
kblok wants to merge 1 commit into
Open
fix: unblock service-worker registration block after worker-buffer change#3506kblok wants to merge 1 commit into
kblok wants to merge 1 commit into
Conversation
…tration Two recently-merged changes interact badly. #3487 made worker CDPSessions buffer their method-events until a consumer flushes them (so a CdpWebWorker doesn't miss its init events). #3490 blocks a disallowed service worker by enabling Fetch interception on its session and failing the paused request. But a blocked worker never becomes a CdpWebWorker, so nothing ever flushed its buffer — the Fetch.requestPaused event stayed buffered, the worker's script fetch stayed paused, and registration hung until the 180s protocol timeout (the two ShouldFailServiceWorkerRegistration* tests timed out on every config). Each PR passed alone; together on master they deadlock. Flush the session right after attaching the Fetch listener so requestPaused is delivered live. Verified locally: both tests pass in ~1s (were hanging). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
A regression from merging #3487 and #3490 together. #3487 made worker
CDPSessions buffer their method-events until a consumer flushes them; #3490 blocks a disallowed service worker via Fetch interception on its session. A blocked worker never becomes aCdpWebWorker, so nothing flushed the buffer — theFetch.requestPausedevent stayed buffered, the script fetch stayed paused, andregister()hung until the 180s protocol timeout (bothShouldFailServiceWorkerRegistration*tests timed out on master).Fix flushes the session right after attaching the Fetch listener. Verified locally: both tests pass in ~1s (were hanging).