diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index 2c2d4dda0c33f8..6b6d640477b9dc 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -312,7 +312,7 @@ export class LibuvStreamWrap extends HandleWrap { /** Internal method for reading from the attached stream. */ async #read() { // Lock safety: We must hold this lock until we are certain that buf is no longer used - // This setup code is a little verbose, but + // This setup code is a little verbose, but we need to be careful about buffer managedment let buf, locked; if (bufLocked) { buf = new Uint8Array(SUGGESTED_SIZE); @@ -363,7 +363,7 @@ export class LibuvStreamWrap extends HandleWrap { if (nread > 0) { this.bytesRead += nread; } - +git // We release the lock early so a re-entrant read can make use of the shared buffer, but // we need to make a copy of the data in the shared buffer. if (locked) {