mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
LibJS: Check if class extends value has a valid prototype
If we have a function as class extends value, we still cannot assume that it has a prototype property and that property has a function or null as its value - blindly calling to_object() on it may fail. Fixes #5075.
This commit is contained in:
parent
397f432aed
commit
766f30f593
3 changed files with 27 additions and 3 deletions
|
@ -36,8 +36,9 @@
|
|||
M(BigIntIntArgument, "BigInt argument must be an integer") \
|
||||
M(BigIntInvalidValue, "Invalid value for BigInt: {}") \
|
||||
M(ClassConstructorWithoutNew, "Class constructor {} must be called with 'new'") \
|
||||
M(ClassExtendsValueNotAConstructorOrNull, "Class extends value {} is not a constructor or null") \
|
||||
M(ClassExtendsValueInvalidPrototype, "Class extends value has an invalid prototype {}") \
|
||||
M(ClassIsAbstract, "Abstract class {} cannot be constructed directly") \
|
||||
M(ClassDoesNotExtendAConstructorOrNull, "Class extends value {} is not a constructor or null") \
|
||||
M(ConstructorWithoutNew, "{} constructor must be called with 'new'") \
|
||||
M(Convert, "Cannot convert {} to {}") \
|
||||
M(ConvertUndefinedToObject, "Cannot convert undefined to object") \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue