Unverified Commit 67a9742a authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Myles Borins
Browse files

src: prevent persistent handle resource leaks

Replace v8::Persistent with node::Persistent, a specialization that
resets the persistent handle on destruction.  Prevents accidental
resource leaks when forgetting to call .Reset() manually.

I'm fairly confident this commit fixes a number of resource leaks that
have gone undiagnosed so far.

Backport-PR-URL: https://github.com/nodejs/node/pull/19185
PR-URL: https://github.com/nodejs/node/pull/18656


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
parent 08bcdde8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment