diff --git a/test/addons/callback-scope/binding.cc b/test/addons/callback-scope/binding.cc index 3b69d2d5725a8f..94d5ec91d7f3a2 100644 --- a/test/addons/callback-scope/binding.cc +++ b/test/addons/callback-scope/binding.cc @@ -41,7 +41,8 @@ static void Callback(uv_work_t* req, int ignored) { v8::Local local = v8::Local::New(isolate, persistent); - local->Resolve(v8::Undefined(isolate)); + local->Resolve(isolate->GetCurrentContext(), + v8::Undefined(isolate)).ToChecked(); delete req; } @@ -49,7 +50,8 @@ static void TestResolveAsync(const v8::FunctionCallbackInfo& args) { v8::Isolate* isolate = args.GetIsolate(); if (persistent.IsEmpty()) { - persistent.Reset(isolate, v8::Promise::Resolver::New(isolate)); + persistent.Reset(isolate, v8::Promise::Resolver::New( + isolate->GetCurrentContext()).ToLocalChecked()); uv_work_t* req = new uv_work_t;