mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LibWeb: Do not crash if parsing failed in load_document()
If `load_document()` is called with a response that has a mime type we can't use to build a document, we should return nullptr as the spec says, instead of crashing. Also we should not crash if error happened during parsing.
This commit is contained in:
parent
351567a01f
commit
4446858401
2 changed files with 31 additions and 10 deletions
|
@ -813,8 +813,6 @@ WebIDL::ExceptionOr<void> Navigable::populate_session_history_entry_document(JS:
|
|||
|
||||
// 2. If document is null, then run completionSteps and return.
|
||||
if (!document) {
|
||||
VERIFY_NOT_REACHED();
|
||||
|
||||
completion_steps();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue