mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibJS: Add a bunch more missing ECMA-262 section/title/URL comments
This commit is contained in:
parent
7f97e33778
commit
7f8245439b
9 changed files with 56 additions and 1 deletions
|
@ -19,15 +19,20 @@ void ErrorConstructor::initialize(GlobalObject& global_object)
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
NativeFunction::initialize(global_object);
|
||||
|
||||
// 20.5.2.1 Error.prototype, https://tc39.es/ecma262/#sec-error.prototype
|
||||
define_property(vm.names.prototype, global_object.error_prototype(), 0);
|
||||
|
||||
define_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
}
|
||||
|
||||
// 20.5.1.1 Error ( message ), https://tc39.es/ecma262/#sec-error-message
|
||||
Value ErrorConstructor::call()
|
||||
{
|
||||
return construct(*this);
|
||||
}
|
||||
|
||||
// 20.5.1.1 Error ( message ), https://tc39.es/ecma262/#sec-error-message
|
||||
Value ErrorConstructor::construct(Function&)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
@ -60,17 +65,23 @@ Value ErrorConstructor::construct(Function&)
|
|||
{ \
|
||||
auto& vm = this->vm(); \
|
||||
NativeFunction::initialize(global_object); \
|
||||
\
|
||||
/* 20.5.6.2.1 NativeError.prototype, \
|
||||
https://tc39.es/ecma262/#sec-nativeerror.prototype */ \
|
||||
define_property(vm.names.prototype, global_object.snake_name##_prototype(), 0); \
|
||||
\
|
||||
define_property(vm.names.length, Value(1), Attribute::Configurable); \
|
||||
} \
|
||||
\
|
||||
ConstructorName::~ConstructorName() { } \
|
||||
\
|
||||
/* 20.5.6.1.1 NativeError ( message ), https://tc39.es/ecma262/#sec-nativeerror */ \
|
||||
Value ConstructorName::call() \
|
||||
{ \
|
||||
return construct(*this); \
|
||||
} \
|
||||
\
|
||||
/* 20.5.6.1.1 NativeError ( message ), https://tc39.es/ecma262/#sec-nativeerror */ \
|
||||
Value ConstructorName::construct(Function&) \
|
||||
{ \
|
||||
auto& vm = this->vm(); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue