Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 <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 28, 2020
1 parent 16a913f commit 12b8345
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/_http_agent.js
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 12b8345

Please sign in to comment.