diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-12 19:57:40 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-12 19:57:40 +0100 |
commit | 32963cf74a9e4b66ba3122a5e52a62911de65746 (patch) | |
tree | d9f3debdda341a8f5f09304922f9b1024d62f646 /Libraries/LibJS/Interpreter.cpp | |
parent | 7912f33ea0c223b88ff79ad4c072ec87dd0c29c4 (diff) | |
download | serenity-32963cf74a9e4b66ba3122a5e52a62911de65746.zip |
LibJS: Allow implicit Value construction from GC-allocated things
Diffstat (limited to 'Libraries/LibJS/Interpreter.cpp')
-rw-r--r-- | Libraries/LibJS/Interpreter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp index b62c7db5ca..637736b97e 100644 --- a/Libraries/LibJS/Interpreter.cpp +++ b/Libraries/LibJS/Interpreter.cpp @@ -38,11 +38,11 @@ Interpreter::Interpreter() : m_heap(*this) { m_global_object = heap().allocate<Object>(); - m_global_object->put("print", Value(heap().allocate<NativeFunction>([](Vector<Argument> arguments) -> Value { + m_global_object->put("print", heap().allocate<NativeFunction>([](Vector<Argument> arguments) -> Value { for (auto& argument : arguments) printf("%s ", argument.value.to_string().characters()); return js_undefined(); - }))); + })); } Interpreter::~Interpreter() |