From 59773fc467361a12971329e3fb5eaddff84b866e Mon Sep 17 00:00:00 2001 From: Eduard Fischer-Szava <50618110+EduardF1@users.noreply.github.com> Date: Sun, 7 Jun 2026 03:11:34 +0200 Subject: [PATCH] fix(buffer): resolve Blob.prototype.stream() memory leak Fixes #63574 --- lib/internal/blob.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/internal/blob.js b/lib/internal/blob.js index f16e520e197cdd..fc029674eb579f 100644 --- a/lib/internal/blob.js +++ b/lib/internal/blob.js @@ -530,6 +530,9 @@ function createBlobReaderStream(reader) { pending.reject(reason); } this.pendingPulls = []; + // Explicitly clear the reader wakeup callback to sever the GC reference + // between the active C++ handle and the pending JS stream. + reader.setWakeup(undefined); }, // We set the highWaterMark to 0 because we do not want the stream to // start reading immediately on creation. We want it to wait until read