LibJS: Add interpreter exception checks

This commit is contained in:
Matthew Olsson
2020-06-07 10:53:14 -07:00
committed by Andreas Kling
parent f306ddb78b
commit 4e33fbdb67
11 changed files with 137 additions and 36 deletions

View File

@@ -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);
}