Skip to content
Commit 64131932 authored by W. James MacLean's avatar W. James MacLean Committed by Chromium LUCI CQ
Browse files

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: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: W. James Maclean <wjmaclean@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1279878}
parent 4230177d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment