1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 20:45:08 +00:00

LibJS: Add js_string(Interpreter&, String)

This commit is contained in:
Andreas Kling 2020-04-04 12:57:37 +02:00
parent d8e944e899
commit faac43597a
11 changed files with 33 additions and 26 deletions

View file

@ -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);
}
}