diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2018-02-21 17:24:18 +0300 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2018-02-21 17:24:18 +0300 |
commit | 992703f2b50f6b3483e9b930737d177b9e01256d (patch) | |
tree | 7d9b2752b6021d7653d426bbebdc80a437624a47 /src/node_file.h | |
parent | e53275d819fb21d4bb15a27a714f134551233cf9 (diff) |
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.
PR-URL: https://github.com/nodejs/node/pull/18656
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/node_file.h')
-rw-r--r-- | src/node_file.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/node_file.h b/src/node_file.h index 094963c53ac..a65b9f0e5fc 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -14,7 +14,6 @@ using v8::HandleScope; using v8::Local; using v8::MaybeLocal; using v8::Object; -using v8::Persistent; using v8::Promise; using v8::Undefined; using v8::Value; |