mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibJS: Support @@toPrimitive in ToPrimitive abstract operation
Fixes #3961.
This commit is contained in:
parent
f99644e75b
commit
585123127e
Notes:
sideshowbarker
2024-07-18 21:45:37 +09:00
Author: https://github.com/linusg
Commit: 585123127e
Pull-request: https://github.com/SerenityOS/serenity/pull/5609
Issue: https://github.com/SerenityOS/serenity/issues/3961
5 changed files with 73 additions and 19 deletions
|
@ -57,7 +57,7 @@ BigIntConstructor::~BigIntConstructor()
|
|||
|
||||
Value BigIntConstructor::call()
|
||||
{
|
||||
auto primitive = vm().argument(0).to_primitive(Value::PreferredType::Number);
|
||||
auto primitive = vm().argument(0).to_primitive(global_object(), Value::PreferredType::Number);
|
||||
if (vm().exception())
|
||||
return {};
|
||||
if (primitive.is_number()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue