From 6a78551635cb87595bc05eb3b76718f181486289 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Wed, 17 May 2023 15:23:18 +0300 Subject: fix(ext/node): make nodeGlobalThis configurable (#19163) --- ext/node/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/node/lib.rs') diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 9f6e68461..4c81351a8 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -490,6 +490,8 @@ pub fn initialize_runtime( usesLocalNodeModulesDir, argv0 ); + // Make the nodeGlobalThisName unconfigurable here. + Object.defineProperty(globalThis, nodeGlobalThisName, {{ configurable: false }}); }})('{}', {}, {});"#, NODE_GLOBAL_THIS_NAME, uses_local_node_modules_dir, argv0 ); -- cgit v1.2.3