fix(Blob/stream) blob from fetch now reliable returns type, blob name can be set (#11815)

This commit is contained in:
Ciro Spaciari
2024-06-13 16:55:41 -03:00
committed by GitHub
parent 3568702eca
commit b8ca523bfb
14 changed files with 261 additions and 90 deletions

View File

@@ -78,7 +78,7 @@ pub const StandaloneModuleGraph = struct {
pub fn blob(this: *File, globalObject: *bun.JSC.JSGlobalObject) *bun.JSC.WebCore.Blob {
if (this.blob_ == null) {
var store = bun.JSC.WebCore.Blob.Store.init(@constCast(this.contents), bun.default_allocator) catch bun.outOfMemory();
var store = bun.JSC.WebCore.Blob.Store.init(@constCast(this.contents), bun.default_allocator);
// make it never free
store.ref();