mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibJS: Pass prototype to BooleanObject constructor
This commit is contained in:
parent
298c606200
commit
2a15323029
5 changed files with 15 additions and 8 deletions
|
@ -50,8 +50,7 @@ Value BooleanConstructor::call(Interpreter& interpreter)
|
|||
|
||||
Value BooleanConstructor::construct(Interpreter& interpreter)
|
||||
{
|
||||
auto* bool_object = interpreter.heap().allocate<BooleanObject>(interpreter.argument(0).to_boolean());
|
||||
return Value(bool_object);
|
||||
return BooleanObject::create(interpreter.global_object(), interpreter.argument(0).to_boolean());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue