fix: prevent gin_helper::Locker heap allocation (#39847)

fix: prevent gin_helper::Locker heap allocation
This commit is contained in:
Milan Burda 2023-09-14 21:48:43 +02:00 committed by GitHub
parent d6c04a3787
commit fb6b92076e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,10 @@ class Locker {
Locker(const Locker&) = delete;
Locker& operator=(const Locker&) = delete;
// prevent heap allocation
void* operator new(size_t size) = delete;
void operator delete(void*, size_t) = delete;
private:
const std::unique_ptr<v8::Locker> locker_;
};