Skip to content

Commit 47babd7

Browse files
committed
lib: define kEnumerableProperty atomically
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #63609 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 030cc64 commit 47babd7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/internal/util.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,10 @@ const lazyDOMException = (message, name) => {
726726

727727
};
728728

729-
const kEnumerableProperty = { __proto__: null };
730-
kEnumerableProperty.enumerable = true;
731-
ObjectFreeze(kEnumerableProperty);
729+
const kEnumerableProperty = ObjectFreeze({
730+
__proto__: null,
731+
enumerable: true,
732+
});
732733

733734
const kEmptyObject = ObjectFreeze({ __proto__: null });
734735

0 commit comments

Comments
 (0)