diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-03-21 08:24:33 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 02:54:33 +0000 |
commit | 2f7b9660fa2316ec6301c9c72cc2cfa12c361cf4 (patch) | |
tree | 4a6dd54ab0b177dae976b8db3df7324aec6de986 /runtime/js/99_main.js | |
parent | e45f433a16f8b03fc11a75ae01287e24cf41bcb8 (diff) |
fix: do not memoize `Deno.ppid` (#23006)
Fixes https://github.com/denoland/deno/issues/23004
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index e97eed9ff..1a1f78119 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -370,7 +370,6 @@ function importScripts(...urls) { const opArgs = memoizeLazy(() => op_bootstrap_args()); const opPid = memoizeLazy(() => op_bootstrap_pid()); -const opPpid = memoizeLazy(() => op_ppid()); setNoColorFn(() => op_bootstrap_no_color() || !op_bootstrap_is_tty()); function formatException(error) { @@ -716,7 +715,9 @@ function bootstrapMainRuntime(runtimeOptions) { ObjectDefineProperties(finalDenoNs, { pid: core.propGetterOnly(opPid), - ppid: core.propGetterOnly(opPpid), + // `ppid` should not be memoized. + // https://github.com/denoland/deno/issues/23004 + ppid: core.propGetterOnly(() => op_ppid()), noColor: core.propGetterOnly(() => op_bootstrap_no_color()), args: core.propGetterOnly(opArgs), mainModule: core.propGetterOnly(() => op_main_module()), |