aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-27 03:45:49 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-27 03:45:49 -0700
commitdf59fe28431837b28e11ee3031667b595f14403e (patch)
treee3c8282e6682e8f705849e6a9fdb56872387f07c /src/bun.js
parent990f53f98619061b170e265d4f3e06146f39135f (diff)
downloadbun-df59fe28431837b28e11ee3031667b595f14403e.tar.gz
bun-df59fe28431837b28e11ee3031667b595f14403e.tar.zst
bun-df59fe28431837b28e11ee3031667b595f14403e.zip
Implement `outdir` in `Bun.build`
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/base.zig8
-rw-r--r--src/bun.js/webcore/blob.zig2
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 {};