mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-19 07:36:16 +00:00
68f2d9f27c
Diagnosed against a fixture rebuilt from the live yummyanime.tv page, with the ad churn the real site produces. Under that churn the resolver reported frame=0, hasVideo=false while the video demonstrably existed two frame levels down: one ad slot tearing down mid-call makes Chromium reject the whole allFrames sweep, and the resolver then silently fell back to the top frame and never looked again. v3.1.2 did not have this failure because webNavigation.getAllFrames() gave it an explicit frame list. That list is now rebuilt without the permission: every content script that messages the background carries sender.frameId, so the background keeps a per-tab registry of frames it has seen and the resolver asks any frame the sweep missed directly. One rejected probe now costs one frame instead of the whole page. Two supporting fixes fell out of the same investigation. Frames reported hidden by an ancestor that could inspect them directly — the 0x0 same-origin wrapper an anime host parks unwatched mirrors in — are now excluded without waiting for the postMessage visibility handshake, which was the tie the resolver kept failing to break. And leaf frames with no video and no nested frames are left out of that handshake entirely, so a churning ad slot can no longer make every phase wait on a frame that is already gone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>