mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 07:22:50 +00:00
LibWeb: Don't copy url when calling determine_the_origin() in Navigable
In #1537, determine_the_origin() changed to take `Optional<URL::URL> const&` as first parameter, but it's passed `Web::Fetch::Infrastructure::Response::url()`, which returns `Optional<URL::URL const&>`. Ladybird does not have SerenityOS/serenity#22870 (yet?), so this mismatch silently creates a copy. Change determine_the_origin() to take `Optional<URL::URL const&>` instead. No behavior change, saves a copy, and is probably what was originally intended.
This commit is contained in:
parent
3f10a5701d
commit
ae7ee22aea
Notes:
github-actions[bot]
2024-11-15 22:27:02 +00:00
Author: https://github.com/nico
Commit: ae7ee22aea
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2358
2 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ bool url_matches_about_srcdoc(URL::URL const& url)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-sequences.html#determining-the-origin
|
||||
URL::Origin determine_the_origin(Optional<URL::URL> const& url, SandboxingFlagSet sandbox_flags, Optional<URL::Origin> source_origin)
|
||||
URL::Origin determine_the_origin(Optional<URL::URL const&> url, SandboxingFlagSet sandbox_flags, Optional<URL::Origin> source_origin)
|
||||
{
|
||||
// 1. If sandboxFlags has its sandboxed origin browsing context flag set, then return a new opaque origin.
|
||||
if (has_flag(sandbox_flags, SandboxingFlagSet::SandboxedOrigin)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue