summaryrefslogtreecommitdiff
path: root/runtime/js/40_signals.js
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2024-05-23 00:03:35 +0200
committerGitHub <noreply@github.com>2024-05-23 00:03:35 +0200
commit971f09abe486185247e1faf4e8d1419ba2506b8d (patch)
tree3ed0cf608116ad06e88a87552333e930824cc790 /runtime/js/40_signals.js
parent6c167c64d61ecfc912dc1b68d300f02aa3677235 (diff)
fix(runtime): use more null proto objects (#23921)
This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/js/40_signals.js')
-rw-r--r--runtime/js/40_signals.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/js/40_signals.js b/runtime/js/40_signals.js
index 9d3cd4092..41f25af67 100644
--- a/runtime/js/40_signals.js
+++ b/runtime/js/40_signals.js
@@ -26,7 +26,7 @@ function unbindSignal(rid) {
// Stores signal listeners and resource data. This has type of
// `Record<string, { rid: number | undefined, listeners: Set<() => void> }`
-const signalData = {};
+const signalData = { __proto__: null };
/** Gets the signal handlers and resource data of the given signal */
function getSignalData(signo) {