mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Remove redundant exception check from ClassExpression::execute()
as_object() cannot fail, leftover from ea55453.
This commit is contained in:
parent
766f30f593
commit
f37d3f25e6
Notes:
sideshowbarker
2024-07-18 22:54:35 +09:00
Author: https://github.com/linusg
Commit: f37d3f25e6
Pull-request: https://github.com/SerenityOS/serenity/pull/5083
1 changed files with 1 additions and 4 deletions
|
@ -825,11 +825,8 @@ Value ClassExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
|
|||
interpreter.vm().throw_exception<TypeError>(global_object, ErrorType::ClassExtendsValueInvalidPrototype, super_constructor_prototype_value.to_string_without_side_effects());
|
||||
return {};
|
||||
}
|
||||
if (super_constructor_prototype_value.is_object()) {
|
||||
if (super_constructor_prototype_value.is_object())
|
||||
super_constructor_prototype = &super_constructor_prototype_value.as_object();
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
}
|
||||
}
|
||||
prototype->set_prototype(super_constructor_prototype);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue