Skip to content

Commit

Permalink
http, async_hooks: remove unneeded reference to wrapping resource
Browse files Browse the repository at this point in the history
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: nodejs#32054
Refs: nodejs#30959
Refs: nodejs#30196
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Flarna authored and targos committed Apr 25, 2020
1 parent b546ade commit 8e4b390
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/_http_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 8e4b390

Please sign in to comment.