summaryrefslogtreecommitdiff
path: root/core/00_primordials.js
diff options
context:
space:
mode:
authorGarcia <phosra@tutanota.com>2022-09-02 08:55:44 -0700
committerGitHub <noreply@github.com>2022-09-02 17:55:44 +0200
commit4ec213b0aa1aeb1b3220ef4b65d8b94f54ddc7b9 (patch)
treeecda846a8d7cc2de07dc4ee5885c169c99b940d5 /core/00_primordials.js
parent03e6727a0461bf83865f6f0412f4fb8990cf27e6 (diff)
fix(ext/timers): create primordial `eval` (#15110)
Diffstat (limited to 'core/00_primordials.js')
-rw-r--r--core/00_primordials.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/00_primordials.js b/core/00_primordials.js
index 4ca7ce073..843eb8b29 100644
--- a/core/00_primordials.js
+++ b/core/00_primordials.js
@@ -468,6 +468,11 @@
queueMicrotask = value;
};
+ // Renaming from `eval` is necessary because otherwise it would perform direct
+ // evaluation, allowing user-land access to local variables.
+ // This is because the identifier `eval` is somewhat treated as a keyword
+ primordials.indirectEval = eval;
+
ObjectSetPrototypeOf(primordials, null);
ObjectFreeze(primordials);