mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibJS: Add interpreter exception checks
This commit is contained in:
parent
f306ddb78b
commit
4e33fbdb67
Notes:
sideshowbarker
2024-07-19 05:45:16 +09:00
Author: https://github.com/mattco98
Commit: 4e33fbdb67
Pull-request: https://github.com/SerenityOS/serenity/pull/2522
11 changed files with 137 additions and 36 deletions
|
@ -52,6 +52,8 @@ Value BoundFunction::construct(Interpreter& interpreter)
|
|||
{
|
||||
if (auto this_value = interpreter.this_value(); m_constructor_prototype && this_value.is_object()) {
|
||||
this_value.as_object().set_prototype(m_constructor_prototype);
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
}
|
||||
return m_target_function->construct(interpreter);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue