diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2018-02-21 15:24:18 +0100 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-03-07 09:30:21 -0800 |
commit | 67a9742aeda8fac73af22609312f4ace8b933218 (patch) | |
tree | 5702ae1c40455228746a403424e672f16394897e /src/inspector_js_api.cc | |
parent | 08bcdde888d7f4ae4eb31de5dd863af1b166e565 (diff) | |
download | node-new-67a9742aeda8fac73af22609312f4ace8b933218.tar.gz |
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: 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/inspector_js_api.cc')
-rw-r--r-- | src/inspector_js_api.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc index 428d8391f2..9a4857f1a1 100644 --- a/src/inspector_js_api.cc +++ b/src/inspector_js_api.cc @@ -19,7 +19,6 @@ using v8::Local; using v8::MaybeLocal; using v8::NewStringType; using v8::Object; -using v8::Persistent; using v8::String; using v8::Value; |