diff --git a/src/WinCtlWindow.cc b/src/WinCtlWindow.cc index 3334e53..edfd060 100644 --- a/src/WinCtlWindow.cc +++ b/src/WinCtlWindow.cc @@ -13,7 +13,7 @@ Window::Window(HWND handle) { Window::~Window() {} void Window::Init (v8::Local exports) { - v8::Local context = exports->CreationContext(); + v8::Local context = exports->GetCreationContext().ToLocalChecked(); Nan::HandleScope scope; v8::Local tpl = Nan::New(New); @@ -305,4 +305,4 @@ void Window::dimensions(const Nan::FunctionCallbackInfo& info) { Nan::Set(result, Nan::New("right").ToLocalChecked(), Nan::New(dim.right)); Nan::Set(result, Nan::New("bottom").ToLocalChecked(), Nan::New(dim.bottom)); info.GetReturnValue().Set(result); -} \ No newline at end of file +} diff --git a/src/WinCtlWrap.cc b/src/WinCtlWrap.cc index 78ef2d9..b7b4d8c 100644 --- a/src/WinCtlWrap.cc +++ b/src/WinCtlWrap.cc @@ -5,11 +5,11 @@ using v8::FunctionTemplate; void InitAll(v8::Local exports) { Window::Init(exports); - v8::Local context = exports->CreationContext(); + v8::Local context = exports->GetCreationContext().ToLocalChecked(); exports->Set(context, Nan::New("GetActiveWindow").ToLocalChecked(), Nan::New(Window::GetActiveWindow)->GetFunction(context).ToLocalChecked()); exports->Set(context, Nan::New("GetWindowByClassName").ToLocalChecked(), Nan::New(Window::GetWindowByClassName)->GetFunction(context).ToLocalChecked()); exports->Set(context, Nan::New("GetWindowByTitleExact").ToLocalChecked(), Nan::New(Window::GetWindowByTitleExact)->GetFunction(context).ToLocalChecked()); exports->Set(context, Nan::New("EnumerateWindows").ToLocalChecked(), Nan::New(Window::EnumerateWindows)->GetFunction(context).ToLocalChecked()); } -NODE_MODULE(NativeExtension, InitAll) \ No newline at end of file +NODE_MODULE(NativeExtension, InitAll)