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: #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 MylesBorins committed Mar 11, 2020
1 parent 5bc5161 commit 49a07f7
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 @@ -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;
}
}

Expand Down

0 comments on commit 49a07f7

Please sign in to comment.