From 12b8345db81baf78d6ec4ec3100fc279216334f5 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_. PR-URL: https://github.com/nodejs/node/pull/32054 Refs: https://github.com/nodejs/node/pull/30959 Refs: https://github.com/nodejs/node/pull/30196 Reviewed-By: Anna Henningsen Reviewed-By: Michael Dawson Reviewed-By: Ruben Bridgewater --- lib/_http_agent.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 40eb2a352b8e70..7fb4a4929c35f5 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -45,18 +45,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; } }