mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibJS: Add js_string(Interpreter&, String)
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/PrimitiveString.h>
|
||||
|
||||
namespace JS {
|
||||
@@ -43,4 +44,9 @@ PrimitiveString* js_string(Heap& heap, String string)
|
||||
return heap.allocate<PrimitiveString>(move(string));
|
||||
}
|
||||
|
||||
PrimitiveString* js_string(Interpreter& interpreter, String string)
|
||||
{
|
||||
return js_string(interpreter.heap(), string);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user