From bb6fd7c2d1fe6efdfd212a0162effc1188f1ea61 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 11 Sep 2025 16:07:36 +0200 Subject: [PATCH] src: ensure `v8::Eternal` is empty before setting it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit V8 does not check this for us, but this is a requirement of the API. PR-URL: https://github.com/nodejs/node/pull/59825 Reviewed-By: James M Snell Reviewed-By: Chengzhong Wu Reviewed-By: Juan José Arboleda --- src/env-inl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/env-inl.h b/src/env-inl.h index 67b4cc2037b..da2c468f11c 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -873,6 +873,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)