mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibJS: Set NativeError constructors' prototype to Error constructor
The FunctionPrototype is correct for ErrorConstructor itself: 20.5.2 Properties of the Error Constructor The Error constructor: - has a [[Prototype]] internal slot whose value is %Function.prototype%. However, not for all the other "NativeError" constructors: 20.5.6.2 Properties of the NativeError Constructors Each NativeError constructor: - has a [[Prototype]] internal slot whose value is %Error%.
This commit is contained in:
parent
70fc0a528c
commit
0e38c9b2f7
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ Value ErrorConstructor::construct(Function&)
|
|||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
|
||||
ConstructorName::ConstructorName(GlobalObject& global_object) \
|
||||
: NativeFunction(*global_object.function_prototype()) \
|
||||
: NativeFunction(*static_cast<Object*>(global_object.error_constructor())) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue