@@ -33,7 +33,7 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
33
33
34
34
PerContextData *perContextData = (PerContextData *) Local<External>::Cast (args.Data ())->Value ();
35
35
36
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
36
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
37
37
/* This one is default constructed with defaults */
38
38
typename APP::template WebSocketBehavior<PerSocketData> behavior = {};
39
39
@@ -293,13 +293,13 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
293
293
app->template ws <PerSocketData>(std::string (pattern.getString ()), std::move (behavior));
294
294
295
295
/* Return this */
296
- args.GetReturnValue ().Set (args.Holder ());
296
+ args.GetReturnValue ().Set (args.This ());
297
297
}
298
298
299
299
/* This method wraps get, post and all http methods */
300
300
template <typename APP, typename F>
301
301
void uWS_App_get (F f, const FunctionCallbackInfo<Value> &args) {
302
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
302
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
303
303
304
304
/* Pattern */
305
305
NativeString pattern (args.GetIsolate (), args[0 ]);
@@ -310,7 +310,7 @@ void uWS_App_get(F f, const FunctionCallbackInfo<Value> &args) {
310
310
/* If the handler is null */
311
311
if (args[1 ]->IsNull ()) {
312
312
(app->*f)(std::string (pattern.getString ()), nullptr );
313
- args.GetReturnValue ().Set (args.Holder ());
313
+ args.GetReturnValue ().Set (args.This ());
314
314
return ;
315
315
}
316
316
@@ -421,7 +421,7 @@ void uWS_App_get(F f, const FunctionCallbackInfo<Value> &args) {
421
421
422
422
});
423
423
424
- args.GetReturnValue ().Set (args.Holder ());
424
+ args.GetReturnValue ().Set (args.This ());
425
425
return ;
426
426
}
427
427
@@ -455,20 +455,20 @@ void uWS_App_get(F f, const FunctionCallbackInfo<Value> &args) {
455
455
* onAborted handler, so we can assume it's done */
456
456
});
457
457
458
- args.GetReturnValue ().Set (args.Holder ());
458
+ args.GetReturnValue ().Set (args.This ());
459
459
}
460
460
461
461
template <typename APP>
462
462
void uWS_App_close (const FunctionCallbackInfo<Value> &args) {
463
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
463
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
464
464
465
465
app->close ();
466
- args.GetReturnValue ().Set (args.Holder ());
466
+ args.GetReturnValue ().Set (args.This ());
467
467
}
468
468
469
469
template <typename APP>
470
470
void uWS_App_listen_unix (const FunctionCallbackInfo<Value> &args) {
471
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
471
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
472
472
473
473
Isolate *isolate = args.GetIsolate ();
474
474
@@ -497,12 +497,12 @@ void uWS_App_listen_unix(const FunctionCallbackInfo<Value> &args) {
497
497
498
498
app->listen (std::move (cb), path);
499
499
500
- args.GetReturnValue ().Set (args.Holder ());
500
+ args.GetReturnValue ().Set (args.This ());
501
501
}
502
502
503
503
template <typename APP>
504
504
void uWS_App_listen (const FunctionCallbackInfo<Value> &args) {
505
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
505
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
506
506
507
507
Isolate *isolate = args.GetIsolate ();
508
508
@@ -539,12 +539,12 @@ void uWS_App_listen(const FunctionCallbackInfo<Value> &args) {
539
539
app->listen (host, numbers.size () ? numbers[0 ] : 0 ,
540
540
numbers.size () > 1 ? numbers[1 ] : 0 , std::move (cb));
541
541
542
- args.GetReturnValue ().Set (args.Holder ());
542
+ args.GetReturnValue ().Set (args.This ());
543
543
}
544
544
545
545
template <typename APP>
546
546
void uWS_App_filter (const FunctionCallbackInfo<Value> &args) {
547
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
547
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
548
548
549
549
/* Handler */
550
550
Callback checkedCallback (args.GetIsolate (), args[0 ]);
@@ -567,12 +567,12 @@ void uWS_App_filter(const FunctionCallbackInfo<Value> &args) {
567
567
CallJS (isolate, cb.Get (isolate), 2 , argv);
568
568
});
569
569
570
- args.GetReturnValue ().Set (args.Holder ());
570
+ args.GetReturnValue ().Set (args.This ());
571
571
}
572
572
573
573
template <typename APP>
574
574
void uWS_App_domain (const FunctionCallbackInfo<Value> &args) {
575
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
575
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
576
576
577
577
Isolate *isolate = args.GetIsolate ();
578
578
@@ -588,12 +588,12 @@ void uWS_App_domain(const FunctionCallbackInfo<Value> &args) {
588
588
589
589
app->domain (std::string (serverName.getString ()));
590
590
591
- args.GetReturnValue ().Set (args.Holder ());
591
+ args.GetReturnValue ().Set (args.This ());
592
592
}
593
593
594
594
template <typename APP>
595
595
void uWS_App_publish (const FunctionCallbackInfo<Value> &args) {
596
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
596
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
597
597
598
598
Isolate *isolate = args.GetIsolate ();
599
599
@@ -619,7 +619,7 @@ void uWS_App_publish(const FunctionCallbackInfo<Value> &args) {
619
619
620
620
template <typename APP>
621
621
void uWS_App_numSubscribers (const FunctionCallbackInfo<Value> &args) {
622
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
622
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
623
623
624
624
Isolate *isolate = args.GetIsolate ();
625
625
@@ -715,20 +715,20 @@ std::pair<uWS::SocketContextOptions, bool> readOptionsObject(const FunctionCallb
715
715
716
716
template <typename APP>
717
717
void uWS_App_adoptSocket (const FunctionCallbackInfo<Value> &args) {
718
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
718
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
719
719
720
720
Isolate *isolate = args.GetIsolate ();
721
721
722
722
int32_t fd = args[0 ]->Int32Value (isolate->GetCurrentContext ()).ToChecked ();
723
723
724
724
app->adoptSocket (fd);
725
725
726
- args.GetReturnValue ().Set (args.Holder ());
726
+ args.GetReturnValue ().Set (args.This ());
727
727
}
728
728
729
729
template <typename APP>
730
730
void uWS_App_removeChildApp (const FunctionCallbackInfo<Value> &args) {
731
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
731
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
732
732
733
733
Isolate *isolate = args.GetIsolate ();
734
734
@@ -739,12 +739,12 @@ void uWS_App_removeChildApp(const FunctionCallbackInfo<Value> &args) {
739
739
740
740
app->removeChildApp (receivingApp);
741
741
742
- args.GetReturnValue ().Set (args.Holder ());
742
+ args.GetReturnValue ().Set (args.This ());
743
743
}
744
744
745
745
template <typename APP>
746
746
void uWS_App_addChildApp (const FunctionCallbackInfo<Value> &args) {
747
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
747
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
748
748
749
749
Isolate *isolate = args.GetIsolate ();
750
750
@@ -755,19 +755,19 @@ void uWS_App_addChildApp(const FunctionCallbackInfo<Value> &args) {
755
755
756
756
memcpy (&receivingApp, &descriptor, sizeof (receivingApp));
757
757
758
- /* Todo: check the class type of args[0] must match class type of args.Holder () */
758
+ /* Todo: check the class type of args[0] must match class type of args.This () */
759
759
// if (args[0])
760
760
761
761
// std::cout << "addChildApp: " << receivingApp << std::endl;
762
762
763
763
app->addChildApp (receivingApp);
764
764
765
- args.GetReturnValue ().Set (args.Holder ());
765
+ args.GetReturnValue ().Set (args.This ());
766
766
}
767
767
768
768
template <typename APP>
769
769
void uWS_App_getDescriptor (const FunctionCallbackInfo<Value> &args) {
770
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
770
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
771
771
772
772
Isolate *isolate = args.GetIsolate ();
773
773
@@ -776,7 +776,7 @@ void uWS_App_getDescriptor(const FunctionCallbackInfo<Value> &args) {
776
776
// static thread_local std::unordered_set<UniquePersistent<Object>> persistentApps;
777
777
778
778
UniquePersistent<Object> *persistentApp = new UniquePersistent<Object>;
779
- persistentApp->Reset (args.GetIsolate (), args.Holder ());
779
+ persistentApp->Reset (args.GetIsolate (), args.This ());
780
780
781
781
// persistentApps.emplace(persistentApp);
782
782
@@ -792,7 +792,7 @@ void uWS_App_getDescriptor(const FunctionCallbackInfo<Value> &args) {
792
792
793
793
template <typename APP>
794
794
void uWS_App_addServerName (const FunctionCallbackInfo<Value> &args) {
795
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
795
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
796
796
797
797
Isolate *isolate = args.GetIsolate ();
798
798
NativeString hostnamePatternValue (isolate, args[0 ]);
@@ -811,12 +811,12 @@ void uWS_App_addServerName(const FunctionCallbackInfo<Value> &args) {
811
811
812
812
app->addServerName (hostnamePattern.c_str (), options);
813
813
814
- args.GetReturnValue ().Set (args.Holder ());
814
+ args.GetReturnValue ().Set (args.This ());
815
815
}
816
816
817
817
template <typename APP>
818
818
void uWS_App_removeServerName (const FunctionCallbackInfo<Value> &args) {
819
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
819
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
820
820
821
821
Isolate *isolate = args.GetIsolate ();
822
822
NativeString hostnamePatternValue (isolate, args[0 ]);
@@ -830,12 +830,12 @@ void uWS_App_removeServerName(const FunctionCallbackInfo<Value> &args) {
830
830
831
831
app->removeServerName (hostnamePattern.c_str ());
832
832
833
- args.GetReturnValue ().Set (args.Holder ());
833
+ args.GetReturnValue ().Set (args.This ());
834
834
}
835
835
836
836
template <typename APP>
837
837
void uWS_App_missingServerName (const FunctionCallbackInfo<Value> &args) {
838
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
838
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
839
839
Isolate *isolate = args.GetIsolate ();
840
840
841
841
UniquePersistent<Function> missingPf;
@@ -849,7 +849,7 @@ void uWS_App_missingServerName(const FunctionCallbackInfo<Value> &args) {
849
849
CallJS (isolate, missingLf, 1 , argv);
850
850
});
851
851
852
- args.GetReturnValue ().Set (args.Holder ());
852
+ args.GetReturnValue ().Set (args.This ());
853
853
}
854
854
855
855
template <typename APP>
@@ -899,7 +899,7 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
899
899
std::cout << " Registering cached get handler" << std::endl;
900
900
901
901
902
- APP *app = (APP *) args.Holder ()->GetAlignedPointerFromInternalField (0 );
902
+ APP *app = (APP *) args.This ()->GetAlignedPointerFromInternalField (0 );
903
903
904
904
/* Pattern */
905
905
NativeString pattern (args.GetIsolate (), args[0 ]);
@@ -939,7 +939,7 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
939
939
* onAborted handler, so we can assume it's done */
940
940
}/* , 13*/ );
941
941
942
- args.GetReturnValue ().Set (args.Holder ());
942
+ args.GetReturnValue ().Set (args.This ());
943
943
944
944
945
945
} else {
@@ -1036,4 +1036,4 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
1036
1036
1037
1037
args.GetReturnValue ().Set (localApp);
1038
1038
1039
- }
1039
+ }
0 commit comments