mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 02:04:59 +00:00
LibWeb: Implement the "error to rethrow" mechanism in HTML::Script
This allows JS module loads to fail and throw without crashing the WebContent process due to a TODO() assertion.
This commit is contained in:
parent
2959c2f2eb
commit
819fb39a87
6 changed files with 47 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -23,4 +23,12 @@ void Script::visit_host_defined_self(JS::Cell::Visitor& visitor)
|
|||
visitor.visit(this);
|
||||
}
|
||||
|
||||
void Script::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_settings_object);
|
||||
visitor.visit(m_parse_error);
|
||||
visitor.visit(m_error_to_rethrow);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue