src: use BaseObjectPtr to store SNI context · nodejs/node@7bd587e · GitHub
Skip to content

Commit 7bd587e

Browse files
committed
src: use BaseObjectPtr to store SNI context
Rather than relying on a link to the JS object, store a pointer to the C++ object directly. PR-URL: #30548 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 0b0f023 commit 7bd587e

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/node_crypto.cc

Lines changed: 9 additions & 3 deletions

src/node_crypto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class SSLWrap {
310310
ClientHelloParser hello_parser_;
311311

312312
v8::Global<v8::ArrayBufferView> ocsp_response_;
313-
v8::Global<v8::Value> sni_context_;
313+
BaseObjectPtr<SecureContext> sni_context_;
314314

315315
friend class SecureContext;
316316
};

src/tls_wrap.cc

Lines changed: 1 addition & 2 deletions

0 commit comments

Comments
 (0)