From 9836c67198b2d01350f283e10b872849e81abefa Mon Sep 17 00:00:00 2001 From: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:48:54 -0400 Subject: [PATCH] Apply suggestions from code review wordsmith comments Co-authored-by: Geoffrey Booth Co-authored-by: Antoine du Hamel --- lib/internal/modules/esm/public_loader_proxy.js | 4 ++-- lib/internal/modules/esm/worker.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/modules/esm/public_loader_proxy.js b/lib/internal/modules/esm/public_loader_proxy.js index 4fff75891ed13d..61612d9cc0e7a7 100644 --- a/lib/internal/modules/esm/public_loader_proxy.js +++ b/lib/internal/modules/esm/public_loader_proxy.js @@ -11,8 +11,8 @@ let debug = require('internal/util/debuglog').debuglog('ESMLoader (public)', (fn const commsChannel = new SharedArrayBuffer(2048); /** * The lock/unlock segment of the shared memory. Atomics require this to be a Int32Array. This - * segment is used to tell the main to sleep when the worker is worker, and vice verse (for the - * worker to sleep whilst the main is working). + * segment is used to tell the main to sleep when the worker is processing, and vice versa (for the + * worker to sleep whilst the main thread is processing). * 0 → main sleeps * 1 → worker sleeps */ diff --git a/lib/internal/modules/esm/worker.js b/lib/internal/modules/esm/worker.js index 1dccbd8bdd40d1..06fc42e00ab8ff 100644 --- a/lib/internal/modules/esm/worker.js +++ b/lib/internal/modules/esm/worker.js @@ -6,7 +6,7 @@ const { commsChannel } = workerData; // lock = 0 → main sleeps // lock = 1 → worker sleeps const lock = new Int32Array(commsChannel, 0, 4); // Required by Atomics -const requestResponseData = new Uint8Array(commsChannel, 4, 2044); // for TextEncoder/Decoder +const requestResponseData = new Uint8Array(commsChannel, 4, 2044); // for v8.serialize/deserialize const publicESMLoader = new ESMLoader();