mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Show error page if we can't handle a frame's main resource
If we can't figure out how to make a Document for the main resource in a Frame, just show an error page.
This commit is contained in:
parent
f88146c7c9
commit
71da52482c
Notes:
sideshowbarker
2024-07-19 05:48:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/71da52482c0
@ -221,7 +221,12 @@ void FrameLoader::resource_did_load()
|
||||
|
||||
dbg() << "I believe this content has MIME type '" << resource()->mime_type() << "', encoding '" << resource()->encoding() << "'";
|
||||
auto document = create_document_from_mime_type(resource()->encoded_data(), url, resource()->mime_type(), resource()->encoding());
|
||||
ASSERT(document);
|
||||
|
||||
if (!document) {
|
||||
load_error_page(url, "Failed to parse content.");
|
||||
return;
|
||||
}
|
||||
|
||||
frame().set_document(document);
|
||||
|
||||
if (!url.fragment().is_empty())
|
||||
|
Loading…
Reference in New Issue
Block a user