From 723d5c058fa180684df13bd2a83bbf3ca6201957 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 17 Apr 2019 23:16:22 +0200 Subject: src: prefer v8::Global over node::Persistent `v8::Global` is essentially a nicer variant of `node::Persistent` that, in addition to reset-on-destroy, also implements move semantics. This commit makes the necessary replacements, removes `node::Persistent` and (now-)unnecessary inclusions of the `node_persistent.h` header, and makes some of the functions that take Persistents as arguments more generic so that they work with all `v8::PersistentBase` flavours. PR-URL: https://github.com/nodejs/node/pull/27287 Reviewed-By: Gus Caplan Reviewed-By: Eugene Ostroukhov Reviewed-By: Joyee Cheung Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- src/node_crypto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/node_crypto.h') diff --git a/src/node_crypto.h b/src/node_crypto.h index 657789afc4..44206b58dd 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -321,8 +321,8 @@ class SSLWrap { ClientHelloParser hello_parser_; - Persistent ocsp_response_; - Persistent sni_context_; + v8::Global ocsp_response_; + v8::Global sni_context_; friend class SecureContext; }; -- cgit v1.2.3