diff options
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/polyfills/process.ts | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts index a8da35f70..518718470 100644 --- a/ext/node/polyfills/process.ts +++ b/ext/node/polyfills/process.ts @@ -48,13 +48,10 @@ import { Command } from "ext:runtime/40_process.js"; let argv0Getter = () => ""; export let argv0 = "deno"; -// TODO(kt3k): This should be set at start up time export let arch = ""; -// TODO(kt3k): This should be set at start up time export let platform = ""; -// TODO(kt3k): This should be set at start up time export let pid = 0; let stdin, stdout, stderr; @@ -368,9 +365,6 @@ class Process extends EventEmitter { /** https://nodejs.org/api/process.html#process_process_arch */ get arch() { - if (!arch) { - arch = arch_(); - } return arch; } @@ -561,9 +555,6 @@ class Process extends EventEmitter { /** https://nodejs.org/api/process.html#process_process_pid */ get pid() { - if (!pid) { - pid = Deno.pid; - } return pid; } @@ -574,9 +565,6 @@ class Process extends EventEmitter { /** https://nodejs.org/api/process.html#process_process_platform */ get platform() { - if (!platform) { - platform = isWindows ? "win32" : Deno.build.os; - } return platform; } @@ -939,6 +927,10 @@ internals.__bootstrapNodeProcess = function ( process.setStartTime(Date.now()); + arch = arch_(); + platform = isWindows ? "win32" : Deno.build.os; + pid = Deno.pid; + // @ts-ignore Remove setStartTime and #startTime is not modifiable delete process.setStartTime; delete internals.__bootstrapNodeProcess; |