-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ad tagging for MPArch fenced frames in subresource filter
This is a followup to https://crrev.com/5a0d4e585a which changed the subresource filter to treat MPArch fenced frames as child frames for the purpose of ad filtering. This CL updates ad tagging to match so that MPArch fenced frames, despite having their own frame tree and main frame, are treated like iframes. ShadowDOM fenced frames are implemented using a regular child frame so their subresource filtering behavior is already correct. The discussion below is specific to MPArch. The main complication here is making script-based ad tagging work for fenced frame roots. This works by searching the v8 stack for ad scripts when a RenderFrame is created and relies on the RenderFrame being created and initialized synchronously with the JavaScript call that creates the frame. However, an MPArch fenced frame does not create a RenderFrame in its embedder at all; its root RenderFrame is initialized in a new frame tree and renderer at which point the creating v8 stack is gone and inaccessible. This CL makes fenced frame creation take a special path by inspecting the v8 stack at the time the CreateFencedFrame call is made and tagging it separately at that time. The remainder of this CL simply generalizes GetParent checks to also cross fenced frame boundaries, where necessary, and allow fenced frame main frames in methods that previously assumed only non-main frames. Bug: 1263541 Change-Id: I92d6bfbd509ad7abdcef28bc6b0c80fd126acf99 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3537448 Reviewed-by: Alex Turner <alexmt@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Reviewed-by: Josh Karlin <jkarlin@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/main@{#988077}
- Loading branch information
Showing
31 changed files
with
681 additions
and
127 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.