mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +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
|
@ -11,9 +11,10 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
StringObject* StringObject::create(GlobalObject& global_object, PrimitiveString& primitive_string)
|
||||
// 10.4.3.4 StringCreate ( value, prototype ), https://tc39.es/ecma262/#sec-stringcreate
|
||||
StringObject* StringObject::create(GlobalObject& global_object, PrimitiveString& primitive_string, Object& prototype)
|
||||
{
|
||||
return global_object.heap().allocate<StringObject>(global_object, primitive_string, *global_object.string_prototype());
|
||||
return global_object.heap().allocate<StringObject>(global_object, primitive_string, prototype);
|
||||
}
|
||||
|
||||
StringObject::StringObject(PrimitiveString& string, Object& prototype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue