mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
LibJS: Add interpreter exception checks
This commit is contained in:
committed by
Andreas Kling
parent
f306ddb78b
commit
4e33fbdb67
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user