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_; };