8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7aa312 commit dca1ecfCopy full SHA for dca1ecf
src/uv.cc
@@ -76,12 +76,13 @@ void Initialize(Local<Object> target,
76
Local<Map> err_map = Map::New(isolate);
77
78
#define V(name, msg) do { \
79
- Local<Array> arr = Array::New(isolate, 2); \
80
- arr->Set(env->context(), 0, OneByteString(isolate, #name)).FromJust(); \
81
- arr->Set(env->context(), 1, OneByteString(isolate, msg)).FromJust(); \
+ Local<Value> arr[] = { \
+ OneByteString(isolate, #name), \
+ OneByteString(isolate, msg) \
82
+ }; \
83
err_map->Set(context, \
84
Integer::New(isolate, UV_##name), \
- arr).ToLocalChecked(); \
85
+ Array::New(isolate, arr, arraysize(arr))).ToLocalChecked(); \
86
} while (0);
87
UV_ERRNO_MAP(V)
88
#undef V
0 commit comments