summaryrefslogtreecommitdiff
path: root/ext/node/lib.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2023-05-17 15:23:18 +0300
committerGitHub <noreply@github.com>2023-05-17 15:23:18 +0300
commit6a78551635cb87595bc05eb3b76718f181486289 (patch)
treeed4dcfd7b8d00279c5ee320d65075592fc83921d /ext/node/lib.rs
parent243d9c846df5fd9011937655f229b7068b001e3e (diff)
fix(ext/node): make nodeGlobalThis configurable (#19163)
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r--ext/node/lib.rs2
1 files changed, 2 insertions, 0 deletions
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
);