@@ -243,21 +243,6 @@ static void Uptime(const FunctionCallbackInfo<Value>& args) {
243
243
args.GetReturnValue ().Set (result);
244
244
}
245
245
246
- static void GetActiveRequests (const FunctionCallbackInfo<Value>& args) {
247
- Environment* env = Environment::GetCurrent (args);
248
-
249
- std::vector<Local<Value>> request_v;
250
- for (ReqWrapBase* req_wrap : *env->req_wrap_queue ()) {
251
- AsyncWrap* w = req_wrap->GetAsyncWrap ();
252
- if (w->persistent ().IsEmpty ())
253
- continue ;
254
- request_v.emplace_back (w->GetOwner ());
255
- }
256
-
257
- args.GetReturnValue ().Set (
258
- Array::New (env->isolate (), request_v.data (), request_v.size ()));
259
- }
260
-
261
246
static void GetActiveRequestsInfo (const FunctionCallbackInfo<Value>& args) {
262
247
Environment* env = Environment::GetCurrent (args);
263
248
@@ -273,21 +258,6 @@ static void GetActiveRequestsInfo(const FunctionCallbackInfo<Value>& args) {
273
258
Array::New (env->isolate (), requests_info.data (), requests_info.size ()));
274
259
}
275
260
276
- // Non-static, friend of HandleWrap. Could have been a HandleWrap method but
277
- // implemented here for consistency with GetActiveRequests().
278
- void GetActiveHandles (const FunctionCallbackInfo<Value>& args) {
279
- Environment* env = Environment::GetCurrent (args);
280
-
281
- std::vector<Local<Value>> handle_v;
282
- for (auto w : *env->handle_wrap_queue ()) {
283
- if (!HandleWrap::HasRef (w))
284
- continue ;
285
- handle_v.emplace_back (w->GetOwner ());
286
- }
287
- args.GetReturnValue ().Set (
288
- Array::New (env->isolate (), handle_v.data (), handle_v.size ()));
289
- }
290
-
291
261
void GetActiveHandlesInfo (const FunctionCallbackInfo<Value>& args) {
292
262
Environment* env = Environment::GetCurrent (args);
293
263
@@ -576,9 +546,7 @@ static void Initialize(Local<Object> target,
576
546
env->SetMethod (target, " cpuUsage" , CPUUsage);
577
547
env->SetMethod (target, " resourceUsage" , ResourceUsage);
578
548
579
- env->SetMethod (target, " _getActiveRequests" , GetActiveRequests);
580
549
env->SetMethod (target, " _getActiveRequestsInfo" , GetActiveRequestsInfo);
581
- env->SetMethod (target, " _getActiveHandles" , GetActiveHandles);
582
550
env->SetMethod (target, " _getActiveHandlesInfo" , GetActiveHandlesInfo);
583
551
env->SetMethod (target, " _kill" , Kill);
584
552
@@ -605,9 +573,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
605
573
registry->Register (CPUUsage);
606
574
registry->Register (ResourceUsage);
607
575
608
- registry->Register (GetActiveRequests);
609
576
registry->Register (GetActiveRequestsInfo);
610
- registry->Register (GetActiveHandles);
611
577
registry->Register (GetActiveHandlesInfo);
612
578
registry->Register (Kill);
613
579
0 commit comments