Skip to content

Commit 59773fc

Browse files
committed
fix(buffer): resolve Blob.prototype.stream() memory leak
Fixes #63574
1 parent 2adaeee commit 59773fc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/internal/blob.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,9 @@ function createBlobReaderStream(reader) {
530530
pending.reject(reason);
531531
}
532532
this.pendingPulls = [];
533+
// Explicitly clear the reader wakeup callback to sever the GC reference
534+
// between the active C++ handle and the pending JS stream.
535+
reader.setWakeup(undefined);
533536
},
534537
// We set the highWaterMark to 0 because we do not want the stream to
535538
// start reading immediately on creation. We want it to wait until read

0 commit comments

Comments
 (0)