mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +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: https://github.com/LadybirdBrowser/ladybird/commit/ae7ee22aea2 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)) {
|
||||
|
|
|
@ -169,7 +169,7 @@ private:
|
|||
GC::Ptr<BrowsingContext> m_previous_sibling;
|
||||
};
|
||||
|
||||
URL::Origin determine_the_origin(Optional<URL::URL> const&, SandboxingFlagSet, Optional<URL::Origin> source_origin);
|
||||
URL::Origin determine_the_origin(Optional<URL::URL const&>, SandboxingFlagSet, Optional<URL::Origin> source_origin);
|
||||
|
||||
SandboxingFlagSet determine_the_creation_sandboxing_flags(BrowsingContext const&, GC::Ptr<DOM::Element> embedder);
|
||||
|
||||
|
|
Loading…
Reference in a new issue