From 627b2f11e0b91e94b2c55f81fb4dd3462bdddde5 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 4 Aug 2025 19:48:18 +0200 Subject: [PATCH] src: ensure `v8::Eternal` is empty before setting it V8 does not check this for us, but this is a requirement of the API. --- src/env-inl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/env-inl.h b/src/env-inl.h index 302dfe05475032..2a2884ee31abab 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -839,6 +839,7 @@ void Environment::set_process_exit_handler( return PropertyName##_.Get(isolate_); \ } \ inline void IsolateData::set_##PropertyName(v8::Local value) { \ + CHECK(PropertyName##_.IsEmpty()); \ PropertyName##_.Set(isolate_, value); \ } PER_ISOLATE_TEMPLATE_PROPERTIES(V)