diff options
Diffstat (limited to 'test/addons/new-target/binding.cc')
-rw-r--r-- | test/addons/new-target/binding.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/addons/new-target/binding.cc b/test/addons/new-target/binding.cc index 3ae2aca7c2e..21b932ae018 100644 --- a/test/addons/new-target/binding.cc +++ b/test/addons/new-target/binding.cc @@ -11,8 +11,11 @@ inline void NewClass(const v8::FunctionCallbackInfo<v8::Value>& args) { inline void Initialize(v8::Local<v8::Object> binding) { auto isolate = binding->GetIsolate(); + auto context = isolate->GetCurrentContext(); binding->Set(v8::String::NewFromUtf8(isolate, "Class"), - v8::FunctionTemplate::New(isolate, NewClass)->GetFunction()); + v8::FunctionTemplate::New(isolate, NewClass) + ->GetFunction(context) + .ToLocalChecked()); } NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) |