From af498a0483002913bebcd5a48e359df495ed9ff3 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Tue, 18 Nov 2025 06:55:15 -0800 Subject: [PATCH] runtime: fix small leak in Blob deinit (#24802) pulled out of https://github.com/oven-sh/bun/pull/21663 --- scripts/runner.node.mjs | 2 +- src/bun.js/webcore/Blob.zig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/runner.node.mjs b/scripts/runner.node.mjs index dd566d2b27..bb8d98754a 100755 --- a/scripts/runner.node.mjs +++ b/scripts/runner.node.mjs @@ -494,7 +494,7 @@ async function runTests() { if (isBuildkite) { // Group flaky tests together, regardless of the title const context = flaky ? "flaky" : title; - const style = flaky || title.startsWith("vendor") ? "warning" : "error"; + const style = flaky ? "warning" : "error"; if (!flaky) attempt = 1; // no need to show the retries count on failures, we know it maxed out if (title.startsWith("vendor")) { diff --git a/src/bun.js/webcore/Blob.zig b/src/bun.js/webcore/Blob.zig index c224f9a559..0389bb03a5 100644 --- a/src/bun.js/webcore/Blob.zig +++ b/src/bun.js/webcore/Blob.zig @@ -4772,6 +4772,7 @@ export fn Blob__ref(self: *Blob) void { export fn Blob__deref(self: *Blob) void { bun.assertf(self.isHeapAllocated(), "cannot deref: this Blob is not heap-allocated", .{}); if (self.#ref_count.decrement() == .should_destroy) { + self.#ref_count.increment(); // deinit has its own isHeapAllocated() guard around bun.destroy(this), so this is needed to ensure that returns true. self.deinit(); } }