mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
LibJS: Add interpreter exception checks
This commit is contained in:
committed by
Andreas Kling
parent
f306ddb78b
commit
4e33fbdb67
Notes:
sideshowbarker
2024-07-19 05:45:16 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/4e33fbdb673 Pull-request: https://github.com/SerenityOS/serenity/pull/2522
@@ -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