@@ -758,6 +758,44 @@ void DefineSignalConstants(Local<Object> target) {
758
758
#endif
759
759
}
760
760
761
+ void DefinePriorityConstants (Local<Object> target) {
762
+ #ifdef UV_PRIORITY_LOW
763
+ # define PRIORITY_LOW UV_PRIORITY_LOW
764
+ NODE_DEFINE_CONSTANT (target, PRIORITY_LOW);
765
+ # undef PRIORITY_LOW
766
+ #endif
767
+
768
+ #ifdef UV_PRIORITY_BELOW_NORMAL
769
+ # define PRIORITY_BELOW_NORMAL UV_PRIORITY_BELOW_NORMAL
770
+ NODE_DEFINE_CONSTANT (target, PRIORITY_BELOW_NORMAL);
771
+ # undef PRIORITY_BELOW_NORMAL
772
+ #endif
773
+
774
+ #ifdef UV_PRIORITY_NORMAL
775
+ # define PRIORITY_NORMAL UV_PRIORITY_NORMAL
776
+ NODE_DEFINE_CONSTANT (target, PRIORITY_NORMAL);
777
+ # undef PRIORITY_NORMAL
778
+ #endif
779
+
780
+ #ifdef UV_PRIORITY_ABOVE_NORMAL
781
+ # define PRIORITY_ABOVE_NORMAL UV_PRIORITY_ABOVE_NORMAL
782
+ NODE_DEFINE_CONSTANT (target, PRIORITY_ABOVE_NORMAL);
783
+ # undef PRIORITY_ABOVE_NORMAL
784
+ #endif
785
+
786
+ #ifdef UV_PRIORITY_HIGH
787
+ # define PRIORITY_HIGH UV_PRIORITY_HIGH
788
+ NODE_DEFINE_CONSTANT (target, PRIORITY_HIGH);
789
+ # undef PRIORITY_HIGH
790
+ #endif
791
+
792
+ #ifdef UV_PRIORITY_HIGHEST
793
+ # define PRIORITY_HIGHEST UV_PRIORITY_HIGHEST
794
+ NODE_DEFINE_CONSTANT (target, PRIORITY_HIGHEST);
795
+ # undef PRIORITY_HIGHEST
796
+ #endif
797
+ }
798
+
761
799
void DefineOpenSSLConstants (Local<Object> target) {
762
800
#ifdef OPENSSL_VERSION_NUMBER
763
801
NODE_DEFINE_CONSTANT (target, OPENSSL_VERSION_NUMBER);
@@ -1338,6 +1376,10 @@ void DefineConstants(v8::Isolate* isolate, Local<Object> target) {
1338
1376
CHECK (sig_constants->SetPrototype (env->context (),
1339
1377
Null (env->isolate ())).FromJust ());
1340
1378
1379
+ Local<Object> priority_constants = Object::New (isolate);
1380
+ CHECK (priority_constants->SetPrototype (env->context (),
1381
+ Null (env->isolate ())).FromJust ());
1382
+
1341
1383
Local<Object> fs_constants = Object::New (isolate);
1342
1384
CHECK (fs_constants->SetPrototype (env->context (),
1343
1385
Null (env->isolate ())).FromJust ());
@@ -1361,6 +1403,7 @@ void DefineConstants(v8::Isolate* isolate, Local<Object> target) {
1361
1403
DefineErrnoConstants (err_constants);
1362
1404
DefineWindowsErrorConstants (err_constants);
1363
1405
DefineSignalConstants (sig_constants);
1406
+ DefinePriorityConstants (priority_constants);
1364
1407
DefineSystemConstants (fs_constants);
1365
1408
DefineOpenSSLConstants (crypto_constants);
1366
1409
DefineCryptoConstants (crypto_constants);
@@ -1374,6 +1417,7 @@ void DefineConstants(v8::Isolate* isolate, Local<Object> target) {
1374
1417
os_constants->Set (OneByteString (isolate, " dlopen" ), dlopen_constants);
1375
1418
os_constants->Set (OneByteString (isolate, " errno" ), err_constants);
1376
1419
os_constants->Set (OneByteString (isolate, " signals" ), sig_constants);
1420
+ os_constants->Set (OneByteString (isolate, " priority" ), priority_constants);
1377
1421
target->Set (OneByteString (isolate, " os" ), os_constants);
1378
1422
target->Set (OneByteString (isolate, " fs" ), fs_constants);
1379
1423
target->Set (OneByteString (isolate, " crypto" ), crypto_constants);
0 commit comments