aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/javascript.zig15
-rw-r--r--src/bun.js/webcore/response.zig7
2 files changed, 1 insertions, 21 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig
index 54fec7a96..b46a69cda 100644
--- a/src/bun.js/javascript.zig
+++ b/src/bun.js/javascript.zig
@@ -764,21 +764,6 @@ pub const VirtualMachine = struct {
_ = VirtualMachine.vm.ref_strings.remove(ref_string.hash);
}
- pub fn getFileBlob(this: *VirtualMachine, pathlike: JSC.Node.PathOrFileDescriptor) ?*JSC.WebCore.Blob.Store {
- const hash = pathlike.hash();
- return this.file_blobs.get(hash);
- }
-
- pub fn putFileBlob(this: *VirtualMachine, pathlike: JSC.Node.PathOrFileDescriptor, store: *JSC.WebCore.Blob.Store) !void {
- const hash = pathlike.hash();
- try this.file_blobs.put(hash, store);
- }
-
- pub fn removeFileBlob(this: *VirtualMachine, pathlike: JSC.Node.PathOrFileDescriptor) void {
- const hash = pathlike.hash();
- _ = this.file_blobs.remove(hash);
- }
-
pub fn refCountedResolvedSource(this: *VirtualMachine, code: []const u8, specifier: []const u8, source_url: []const u8, hash_: ?u32) ResolvedSource {
var source = this.refCountedString(code, hash_, true);
diff --git a/src/bun.js/webcore/response.zig b/src/bun.js/webcore/response.zig
index d68d4b6d2..fabaffbad 100644
--- a/src/bun.js/webcore/response.zig
+++ b/src/bun.js/webcore/response.zig
@@ -1703,9 +1703,6 @@ pub const Blob = struct {
pub fn findOrCreateFileFromPath(path_: JSC.Node.PathOrFileDescriptor, globalThis: *JSGlobalObject) Blob {
var vm = globalThis.bunVM();
- if (vm.getFileBlob(path_)) |blob| {
- blob.ref();
- return Blob.initWithStore(blob, globalThis);
}
var allocator = globalThis.bunVM().allocator;
@@ -1743,9 +1740,7 @@ pub const Blob = struct {
}
};
- const result = Blob.initWithStore(Blob.Store.initFile(path, null, allocator) catch unreachable, globalThis);
- vm.putFileBlob(path, result.store.?) catch unreachable;
- return result;
+ return Blob.initWithStore(Blob.Store.initFile(path, null, allocator) catch unreachable, globalThis);
}
pub const Store = struct {