mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 10:55:06 +00:00
LibJS: Add js_string(Interpreter&, String)
This commit is contained in:
parent
d8e944e899
commit
faac43597a
11 changed files with 33 additions and 26 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue