From 935a472c9b5d44684076c3f29246705fe0a34a79 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 2 Jan 2025 14:48:36 -0800 Subject: [PATCH] src: use LocalVector in CipherPushContext --- src/crypto/crypto_util.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h index 5c717c6fdb0fc4..c111b8ba58dd12 100644 --- a/src/crypto/crypto_util.h +++ b/src/crypto/crypto_util.h @@ -545,9 +545,10 @@ void ThrowCryptoError(Environment* env, unsigned long err, // NOLINT(runtime/int) const char* message = nullptr); -class CipherPushContext { +class CipherPushContext final { public: - inline explicit CipherPushContext(Environment* env) : env_(env) {} + inline explicit CipherPushContext(Environment* env) + : list_(env->isolate()), env_(env) {} inline void push_back(const char* str) { list_.emplace_back(OneByteString(env_->isolate(), str)); @@ -558,7 +559,7 @@ class CipherPushContext { } private: - std::vector> list_; + v8::LocalVector list_; Environment* env_; };