diff options
Diffstat (limited to 'src/bun.js')
-rw-r--r-- | src/bun.js/base.zig | 8 | ||||
-rw-r--r-- | src/bun.js/webcore/blob.zig | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bun.js/base.zig b/src/bun.js/base.zig index cbd80db87..da9501541 100644 --- a/src/bun.js/base.zig +++ b/src/bun.js/base.zig @@ -1729,10 +1729,10 @@ pub const JSStringList = std.ArrayList(js.JSStringRef); pub const ArrayBuffer = extern struct { ptr: [*]u8 = undefined, - offset: u32, - len: u32, - byte_len: u32, - typed_array_type: JSC.JSValue.JSType, + offset: u32 = 0, + len: u32 = 0, + byte_len: u32 = 0, + typed_array_type: JSC.JSValue.JSType = .Cell, value: JSC.JSValue = JSC.JSValue.zero, shared: bool = false, diff --git a/src/bun.js/webcore/blob.zig b/src/bun.js/webcore/blob.zig index 4ac48f25f..c5e07b13c 100644 --- a/src/bun.js/webcore/blob.zig +++ b/src/bun.js/webcore/blob.zig @@ -2117,7 +2117,7 @@ pub const Blob = struct { } if (os.S.ISREG(stat.mode) and - this.max_length > std.mem.page_size and + this.max_length > bun.C.preallocate_length and this.max_length != Blob.max_size) { bun.C.preallocate_file(this.destination_fd, 0, this.max_length) catch {}; |