diff --git a/src/uv.cc b/src/uv.cc index efcb8056124318..85f395cc8458eb 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -71,9 +71,11 @@ void Initialize(Local target, Local arr = Array::New(isolate, 2); \ arr->Set(0, OneByteString(isolate, #name)); \ arr->Set(1, OneByteString(isolate, msg)); \ - err_map->Set(context, \ - Integer::New(isolate, UV_##name), \ - arr).ToLocalChecked(); \ + if (err_map->Set(context, \ + Integer::New(isolate, UV_##name), \ + arr).IsEmpty()) { \ + return; \ + } \ } while (0); UV_ERRNO_MAP(V) #undef V