1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibJS: Boolean, Number and String prototypes should have values too

It appears that calling .valueOf() on an objectified primitive's
prototype should return a value after all.

This matches what other engines are doing.
This commit is contained in:
Andreas Kling 2020-04-10 13:04:12 +02:00
parent c06d5ef114
commit 070a8f2689
11 changed files with 33 additions and 9 deletions

View file

@ -28,6 +28,7 @@
#include <LibJS/Runtime/BooleanObject.h>
namespace JS {
BooleanObject::BooleanObject(bool value)
: m_value(value)
{
@ -37,4 +38,5 @@ BooleanObject::BooleanObject(bool value)
BooleanObject::~BooleanObject()
{
}
}