From c4ab0d197c828c454dbe2f4200086ac72d95d315 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Thu, 29 Nov 2018 11:03:55 +0300 Subject: [PATCH] Try new Run #4 --- include/event-emitter.hpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/event-emitter.hpp b/include/event-emitter.hpp index e9c3bbc..60b8825 100644 --- a/include/event-emitter.hpp +++ b/include/event-emitter.hpp @@ -333,9 +333,11 @@ private: "(new Error()).stack.split('\\n').slice(2).join('\\n')" ); - V8_VAR_STR stack = v8::Script::Compile(code)->Run( - Nan::GetCurrentContext() - ).ToLocalChecked(); + V8_VAR_STR stack = Nan::To( + v8::Script::Compile(code)->Run( + Nan::GetCurrentContext() + ).ToLocalChecked() + ); Nan::Utf8String stackStr(stack); msg += *stackStr; @@ -439,9 +441,11 @@ private: }) )"); - V8_VAR_FUNC decor = v8::Script::Compile(code)->Run( - Nan::GetCurrentContext() - ).ToLocalChecked(); + V8_VAR_FUNC decor = Nan::To( + v8::Script::Compile(code)->Run( + Nan::GetCurrentContext() + ).ToLocalChecked() + ); Nan::Callback decorCb(decor); V8_VAR_VAL argv[] = { info.This(), info[0], raw };