From 348522077879c76e8165c82f43e5ca3be6953f1a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 28 May 2026 10:05:43 +0200 Subject: [PATCH] lib: define `kEnumerableProperty` atomically Signed-off-by: Antoine du Hamel --- lib/internal/util.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/internal/util.js b/lib/internal/util.js index 34af9ca6f61a6f..f649478e575c2c 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -726,9 +726,10 @@ const lazyDOMException = (message, name) => { }; -const kEnumerableProperty = { __proto__: null }; -kEnumerableProperty.enumerable = true; -ObjectFreeze(kEnumerableProperty); +const kEnumerableProperty = ObjectFreeze({ + __proto__: null, + enumerable: true, +}); const kEmptyObject = ObjectFreeze({ __proto__: null });