From 5a18d45cbeb1555bedae17224c8041b70f49921c Mon Sep 17 00:00:00 2001 From: raub Date: Mon, 14 May 2018 11:37:37 +0300 Subject: [PATCH] :art: Refactor spaces --- include/addon-tools.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/addon-tools.hpp b/include/addon-tools.hpp index f37c9ee..2e4da38 100644 --- a/include/addon-tools.hpp +++ b/include/addon-tools.hpp @@ -272,10 +272,11 @@ inline void *getData(V8_VAR_OBJ obj) { inline void consoleLog(int argc, V8_VAR_VAL *argv) { V8_VAR_STR code = JS_STR("((...args) => console.log(...args))"); - V8_VAR_FUNC log = V8_VAR_FUNC::Cast(v8::Script::Compile(code)->Run()); + Nan::Callback logCb(log); Nan::AsyncResource async("consoleLog()"); + logCb.Call(argc, argv, &async); }