mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibJS: Make Object.prototype.toString() fully spec compliant
- Fix evaluation order: IsArray(O) should always be called and before Get(O, @@toStringTag), previously it was the other way around and IsArray would only be called if @@toStringTag is not a string - Add missing exception checks to both function calls - Add missing builtin tag for arguments object Also, while we're here: - Update variable names to match spec - Add spec step comments
This commit is contained in:
parent
e1906d74b8
commit
339ccba354
5 changed files with 87 additions and 36 deletions
|
@ -18,6 +18,7 @@ ArgumentsObject::ArgumentsObject(GlobalObject& global_object, Environment& envir
|
|||
void ArgumentsObject::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Base::initialize(global_object);
|
||||
set_has_parameter_map();
|
||||
m_parameter_map = Object::create(global_object, nullptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue