1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

LibJS: Use allocate_without_global_object for primitive cell types

More steps towards multiple global object support. Primitive cells
like strings, bigints, etc, don't actually have any connection to
the global object. Use the explicit API to clarify this.
This commit is contained in:
Andreas Kling 2020-07-24 20:46:55 +02:00
parent 3fdacef07f
commit 3ee6ed965f
5 changed files with 8 additions and 8 deletions

View file

@ -41,7 +41,7 @@ PrimitiveString::~PrimitiveString()
PrimitiveString* js_string(Heap& heap, String string)
{
return heap.allocate<PrimitiveString>(heap.interpreter().global_object(), move(string));
return heap.allocate_without_global_object<PrimitiveString>(move(string));
}
PrimitiveString* js_string(Interpreter& interpreter, String string)