diff options
Diffstat (limited to 'test/addons/heap-profiler/binding.cc')
-rw-r--r-- | test/addons/heap-profiler/binding.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/addons/heap-profiler/binding.cc b/test/addons/heap-profiler/binding.cc index 09feefa6690..861fb5a80c4 100644 --- a/test/addons/heap-profiler/binding.cc +++ b/test/addons/heap-profiler/binding.cc @@ -18,8 +18,11 @@ inline void Test(const v8::FunctionCallbackInfo<v8::Value>& args) { inline void Initialize(v8::Local<v8::Object> binding) { v8::Isolate* const isolate = binding->GetIsolate(); + v8::Local<v8::Context> context = isolate->GetCurrentContext(); binding->Set(v8::String::NewFromUtf8(isolate, "test"), - v8::FunctionTemplate::New(isolate, Test)->GetFunction()); + v8::FunctionTemplate::New(isolate, Test) + ->GetFunction(context) + .ToLocalChecked()); } NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) |