diff options
author | 2023-02-13 00:50:15 -0800 | |
---|---|---|
committer | 2023-02-13 00:50:15 -0800 | |
commit | aa0762e4660bb17b86890b923368e5a0dc8daf7b (patch) | |
tree | a134621368f9def9a85473e90a6189afb956b457 /src/io/io_darwin.zig | |
parent | cdbc620104b939f7112fa613ca192e5fe6e02a7d (diff) | |
download | bun-aa0762e4660bb17b86890b923368e5a0dc8daf7b.tar.gz bun-aa0762e4660bb17b86890b923368e5a0dc8daf7b.tar.zst bun-aa0762e4660bb17b86890b923368e5a0dc8daf7b.zip |
Implement `FormData` (#2051)
* Backport std::forward change
* Implement `FormData`
* Fix io_darwin headers issue
* Implement `Blob` support in FormData
* Add test for file upload
* Fix bug with Blob not reading Content-Type
* Finish implementing FormData
* Add FormData to types
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/io/io_darwin.zig')
-rw-r--r-- | src/io/io_darwin.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/io/io_darwin.zig b/src/io/io_darwin.zig index 06c338a28..fd991bbf5 100644 --- a/src/io/io_darwin.zig +++ b/src/io/io_darwin.zig @@ -259,7 +259,7 @@ const fd_t = os.fd_t; const mem = std.mem; const assert = std.debug.assert; const c = std.c; -const bun = @import("bun"); +const bun = @import("root").bun; pub const darwin = struct { pub usingnamespace os.darwin; pub extern "c" fn @"recvfrom$NOCANCEL"(sockfd: c.fd_t, noalias buf: *anyopaque, len: usize, flags: u32, noalias src_addr: ?*c.sockaddr, noalias addrlen: ?*c.socklen_t) isize; @@ -508,6 +508,8 @@ pub const Waker = struct { const zeroed = std.mem.zeroes([16]Kevent64); pub fn wake(this: *Waker) !void { + bun.JSC.markBinding(@src()); + if (io_darwin_schedule_wakeup(this.machport)) { this.has_pending_wake = false; return; @@ -516,6 +518,7 @@ pub const Waker = struct { } pub fn wait(this: Waker) !usize { + bun.JSC.markBinding(@src()); var events = zeroed; const count = std.os.system.kevent64( @@ -551,6 +554,7 @@ pub const Waker = struct { } pub fn initWithFileDescriptor(allocator: std.mem.Allocator, kq: i32) !Waker { + bun.JSC.markBinding(@src()); assert(kq > -1); var machport_buf = try allocator.alloc(u8, 1024); const machport = io_darwin_create_machport( @@ -573,6 +577,7 @@ pub const UserFilterWaker = struct { ident: u64 = undefined, pub fn wake(this: UserFilterWaker) !void { + bun.JSC.markBinding(@src()); var events = zeroed; events[0].ident = this.ident; events[0].filter = c.EVFILT_USER; |