mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibJS: Move builtin prototypes to the global object
This moves us towards being able to run JavaScript in different global objects without allocating a separate GC heap.
This commit is contained in:
@@ -36,8 +36,7 @@ namespace JS {
|
||||
|
||||
StringObject* StringObject::create(GlobalObject& global_object, PrimitiveString& primitive_string)
|
||||
{
|
||||
auto& interpreter = global_object.interpreter();
|
||||
return interpreter.heap().allocate<StringObject>(primitive_string, *interpreter.string_prototype());
|
||||
return global_object.heap().allocate<StringObject>(primitive_string, *global_object.string_prototype());
|
||||
}
|
||||
|
||||
StringObject::StringObject(PrimitiveString& string, Object& prototype)
|
||||
|
||||
Reference in New Issue
Block a user