mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 22:01:47 +00:00
Make bun.webcore.Blob smaller and ref-counted (#23015)
Reduce the size of `bun.webcore.Blob` from 120 bytes to 96. Also make it ref-counted: in-progress work on improving the bindings generator depends on this, as it means C++ can pass a pointer to the `Blob` to Zig without risking it being destroyed if the GC collects the associated `JSBlob`. Note that this PR depends on #23013. (For internal tracking: fixes STAB-1289, STAB-1290)
This commit is contained in:
@@ -199,7 +199,6 @@ pub const StandaloneModuleGraph = struct {
|
||||
store.ref();
|
||||
|
||||
const b = bun.webcore.Blob.initWithStore(store, globalObject).new();
|
||||
b.allocator = bun.default_allocator;
|
||||
|
||||
if (bun.http.MimeType.byExtensionNoDefault(bun.strings.trimLeadingChar(std.fs.path.extension(this.name), '.'))) |mime| {
|
||||
store.mime_type = mime;
|
||||
|
||||
Reference in New Issue
Block a user