1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

LibURL: Replace Host's Empty state with making Url's Host optional

A couple of reasons:
- Origin's Host (when in the tuple state) can't be null
- There's an "empty host" concept in the spec which is NOT the same as a
  null Host, and that was confusing me.
This commit is contained in:
Sam Atkins 2024-11-27 12:48:28 +00:00 committed by Andreas Kling
parent 8b984c0c57
commit 90e763de4c
Notes: github-actions[bot] 2024-11-30 11:24:09 +00:00
17 changed files with 44 additions and 42 deletions

View file

@ -570,7 +570,7 @@ void ViewImplementation::handle_web_content_process_crash(LoadErrorPage load_err
builder.append(escape_html_entities(m_url.to_byte_string()));
builder.append("</title></head><body>"sv);
builder.append("<h1>Web page crashed"sv);
if (!m_url.host().has<Empty>()) {
if (m_url.host().has_value()) {
builder.appendff(" on {}", escape_html_entities(m_url.serialized_host().release_value_but_fixme_should_propagate_errors()));
}
builder.append("</h1>"sv);