Skip to content

Commit

Permalink
src: use LocalVector in CipherPushContext
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Jan 2, 2025
1 parent 7c68131 commit 935a472
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/crypto/crypto_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -558,7 +559,7 @@ class CipherPushContext {
}

private:
std::vector<v8::Local<v8::Value>> list_;
v8::LocalVector<v8::Value> list_;
Environment* env_;
};

Expand Down

0 comments on commit 935a472

Please sign in to comment.