Don't use-count if a <base> href exists.
In https://chromium-review.googlesource.com/c/chromium/src/+/5383979 we introduced a use counter for the resolution of relative urls in sandboxed srcdoc iframes. Since we're only interested in the case where that resolution uses the inherited `fallback_base_url_` value, we should exclude cases where the srcdoc's content includes a <base> element with an href value. This CL updates to take this into account. In the course of adding this, we discovered that Document::CompleteURL* can be called during preloading, even before any existing <base> element has been processed (see https://crbug.com/331806513). Therefore, this CL also adds a parameter to those functions allowing them to know if they're being called as part of preloading in order to avoid registering use counts that may be incorrect. Bug: 330744612 Change-Id: Ie57dd313e69f889063c053985f79a03879c8a66a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5405456 Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: W. James Maclean <wjmaclean@chromium.org> Reviewed-by:
Charlie Reis <creis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1279878}
Loading
Please register or sign in to comment