mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix crash that sometimes occurred when freeing file data
This commit is contained in:
@@ -3453,7 +3453,8 @@ pub const Blob = struct {
|
||||
const bytes = result.buf;
|
||||
if (blob.size > 0)
|
||||
blob.size = @minimum(@truncate(u32, bytes.len), blob.size);
|
||||
promise.resolve(globalThis, Function(&blob, globalThis, bytes, .transfer));
|
||||
// these are now temporaries
|
||||
promise.resolve(globalThis, Function(&blob, globalThis, bytes, .temporary));
|
||||
},
|
||||
.err => |err| {
|
||||
promise.reject(globalThis, err.toErrorInstance(globalThis));
|
||||
|
||||
Reference in New Issue
Block a user