mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibJS: Get the prototype of a new String from the constructor's realm
This commit is contained in:
parent
5606332ed7
commit
c254e4cf10
4 changed files with 16 additions and 10 deletions
|
@ -449,7 +449,7 @@ Object* Value::to_object(GlobalObject& global_object) const
|
|||
case Type::Double:
|
||||
return NumberObject::create(global_object, as_double());
|
||||
case Type::String:
|
||||
return StringObject::create(global_object, *m_value.as_string);
|
||||
return StringObject::create(global_object, *m_value.as_string, *global_object.string_prototype());
|
||||
case Type::Symbol:
|
||||
return SymbolObject::create(global_object, *m_value.as_symbol);
|
||||
case Type::BigInt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue