Repository navigation
Conversation
…r navigation race - Renames GetExtensionsAsync() to ExtensionsAsync() across IBrowser/Browser/CdpBrowser/BidiBrowser - Adds TriggerExtensionActionAsync(Extension) to IPage/Page/CdpPage - Adds extension-with-page test asset and 6 new extension tests (ShouldListExtensionsAndTheirProperties, ShouldListExtensionWorkers, etc.) - Adds extension Pipe=true option to BrowserWithExtensionOptions for stability - Filters targets in CdpBrowser.Targets() to only exposed, initialized targets - Adds AutoAttachFilter to ChromeTargetManager to exclude page targets from initial attach - Fixes null check in FrameManager.SwapFrameTreeAsync for frame.OnFrameSwappedByActivation() - Fixes prerender navigation: NetworkManager race condition where responseReceived CDP event arrives before requestWillBeSent is processed due to async GetFrameAsync. Queues the response event and processes it once the request is stored. - Fixes secondary race in OnResponseReceivedExtraInfoAsync: when request not yet stored, saves extraInfo and leaves queued group intact for OnRequestAsync to handle - Adds FrameSwappedByActivation subscription and OnRequestServedFromCache handler to LifecycleWatcher Fixes: CanNavigateToAPrerenderedPageViaInput prerender test regression Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
Closing: this was created in error. The fix has been applied directly to PR #3404 (branch implement-upstream-change-14821). |
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.
Summary
Implements upstream PR #14821 which adds browser extension management APIs, plus fixes a prerender navigation race condition discovered during testing.
Extensions API
GetExtensionsAsync()→ExtensionsAsync()acrossIBrowser/Browser/CdpBrowser/BidiBrowserTriggerExtensionActionAsync(Extension)toIPage/Page/CdpPageextension-with-pagetest asset with popup and service worker backgroundcdp/extensions.spec: list extensions/properties, list workers, trigger action, activate popup page, extension pagesPipe = truetoBrowserWithExtensionOptionsfor test stabilityAutoAttachFiltertoChromeTargetManagerto exclude page targets from initial attach (matches upstreamFilteroption)Target Handling
CdpBrowser.Targets()to only return exposed, initialized targets (avoids exposing speculative/prerender targets)IsTargetExposedguard toOnTargetDestroyed/OnTargetCreatedhandlersPrerender Navigation Race Fix
Client_MessageReceivedisasync void—responseReceivedCDP event arrives whilerequestWillBeSentis still awaitingGetFrameAsync, soOnResponseReceivedfinds no request and drops the responseOnResponseReceived, when request is null, queue the response event instead of dropping itOnRequestAsync, after storing the request, check for a queued response and process it immediately before firing theRequesteventOnResponseReceivedExtraInfoAsync, when a queued group exists but the request isn't stored yet, save the extraInfo and leave the queued group forOnRequestAsyncto handleFrameSwappedByActivationsubscription andOnRequestServedFromCachehandler toLifecycleWatcherTest plan
🤖 Generated with Claude Code