Skip to content

Commit 49a07f7

Browse files
FlarnaMylesBorins
authored andcommitted
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: #32054 Refs: #30959 Refs: #30196 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 5bc5161 commit 49a07f7

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/_http_agent.js

-8
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,10 @@ const kOnKeylog = Symbol('onkeylog');
5050
// ClientRequest.onSocket(). The Agent is now *strictly*
5151
// concerned with managing a connection pool.
5252

53-
const kReusedHandle = Symbol('kReusedHandle');
5453
class ReusedHandle {
5554
constructor(type, handle) {
5655
this.type = type;
5756
this.handle = handle;
58-
// We need keep the resource object alive from this object, because
59-
// domains rely on GC of the resource object for lifetime tracking.
60-
// TODO(addaleax): This should really apply to all uses of
61-
// AsyncWrap::AsyncReset() when the resource is not the AsyncWrap object
62-
// itself. However, HTTPClientAsyncResource and HTTPServerAsyncResource
63-
// hold on to other objects, inhibiting GC.
64-
handle[kReusedHandle] = this;
6557
}
6658
}
6759

0 commit comments

Comments
 (0)