GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix compiler warnings in callback-scope · nodejs/node@b8ca616

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/addons/callback-scope
    • binding.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/addons/callback-scope/binding.cc‎

Copy file name to clipboardExpand all lines: test/addons/callback-scope/binding.cc
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ static void Callback(uv_work_t* req, int ignored) {
4141

4242
v8::Local<v8::Promise::Resolver> local =
4343
v8::Local<v8::Promise::Resolver>::New(isolate, persistent);
44-
local->Resolve(v8::Undefined(isolate));
44+
local->Resolve(isolate->GetCurrentContext(),
45+
v8::Undefined(isolate)).ToChecked();
4546
delete req;
4647
}
4748

4849
static void TestResolveAsync(const v8::FunctionCallbackInfo<v8::Value>& args) {
4950
v8::Isolate* isolate = args.GetIsolate();
5051

5152
if (persistent.IsEmpty()) {
52-
persistent.Reset(isolate, v8::Promise::Resolver::New(isolate));
53+
persistent.Reset(isolate, v8::Promise::Resolver::New(
54+
isolate->GetCurrentContext()).ToLocalChecked());
5355

5456
uv_work_t* req = new uv_work_t;
5557

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.