Repository navigation
Conversation
This was referenced Nov 24, 2026
This branch has not been deployed
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.
The browser provider's frame helper waits for any
frameattachedevent when the named Vitest runner is absent. A private source/probe iframe can win that race. The GC barrier then evaluates the wrong context or throwsFrame was detachedwhen the private iframe is removed.Resolve the actual
iframe[data-vitest="true"]element's contentFrame instead, and dispose its temporary ElementHandle before requesting GC. Keep the original 1000 ms frame-selection deadline and the existing GC/evaluation sequence. Production sources, dependencies, assertions, timeouts, browser flags and the three collection calls in each lifecycle test are unchanged.Five identical real Chromium scenes compare the installed provider/original adapter with this adapter (10 executions). Independent DOM frame identity verifies the selected runner. Cases cover an existing runner, private frames arriving before a later runner, no runner ever arriving, and removal of an already selected real runner. The candidate waits for the correct runner, rejects a missing runner at the original deadline, releases all four acquired handles before GC, and still throws the original error when the real runner is detached. Earlier provider failures, private-frame false success and the initial harness import error remain evidence.
Local validation on master
f8d1c4b: lint, build, browser types and installed ESM/CJS/UMD/TS4.9/current consumers pass; full default tests pass 1234 coverage / 1115 source (4 inherited skips each); all 162 built-package browser tests pass. All 284 measured inputs remain stable. Browser package services use separate loopback ports and have stopped.This repairs the independently reproduced frame-selection defect. It does not establish that the earlier project
Frame was detachederror used this path, and it does not claim to fix #650's wider source-document GC failures. Current-head remote results for5fcd839f79cef79d240c748f5ceeac7e21a08d63: CI run 45491737937 failed; CodeQL passed. Coverage passed 1234 tests with 4 skips; source tests passed 1112 with 3 Firefox failures and 4 skips, all inresource-resolver-cancellation.test.ts. Theprobed=falsecase fails at line 111 withnativeCollected=true, ownerCollected=false;probed=truefails there with both values false, before the native assertion at line 112. The pending custom-font resolver case fails its collection assertion at line 202. ItsnativeRetentionflags use!!WeakRef.deref():plain/sharedFonts=falsemeans collected, whilenativeProbe/measuredProbe=truemeans retained;InvalidModificationErroris also reported. Built-package tests and Codecov were skipped after the source failure. These outcomes neither establish a common retaining owner nor replace the independent frame-selection controls above. Failing job and original diagnostics and published exact-head failure evidence. Keep this draft.docs/evidence/gc-runner-frame-controls.json, the 43-member raw archive, SHA index and portable verifier preserve the original and candidate implementations, actual identity/handle/GC observations and complete logs. No npm publication, old contributor-PR closure or Mac network configuration change.