From adbf3898152a5f3de0c8f2aed5d534ee0315c116 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Mon, 2 Mar 2020 23:17:53 +0100 Subject: [PATCH] http, async_hooks: remove unneeded reference to wrapping resource Remove the reference from handle to the unique/wrapping resource ReusedHandle as there is meanwhile a strong reference for all async resources in place via AsyncWarp::resource_. --- lib/_http_agent.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 5e3298b594d949..97f475c65c84a4 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -50,18 +50,10 @@ const kOnKeylog = Symbol('onkeylog'); // ClientRequest.onSocket(). The Agent is now *strictly* // concerned with managing a connection pool. -const kReusedHandle = Symbol('kReusedHandle'); class ReusedHandle { constructor(type, handle) { this.type = type; this.handle = handle; - // We need keep the resource object alive from this object, because - // domains rely on GC of the resource object for lifetime tracking. - // TODO(addaleax): This should really apply to all uses of - // AsyncWrap::AsyncReset() when the resource is not the AsyncWrap object - // itself. However, HTTPClientAsyncResource and HTTPServerAsyncResource - // hold on to other objects, inhibiting GC. - handle[kReusedHandle] = this; } }