Skip to content

Commit

Permalink
fix(bindings): add missing binding
Browse files Browse the repository at this point in the history
  • Loading branch information
WingLim authored and WingLim committed Sep 9, 2023
1 parent ffe4f56 commit 72f0c07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bun.js/event_loop.zig
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ pub const EventLoop = struct {
}
extern fn JSC__JSGlobalObject__drainMicrotasks(*JSC.JSGlobalObject) void;
fn drainMicrotasksWithGlobal(this: *EventLoop, globalObject: *JSC.JSGlobalObject) void {
JSC.markBinding(@src());
JSC__JSGlobalObject__drainMicrotasks(globalObject);
this.drainDeferredTasks();
}
Expand Down
1 change: 1 addition & 0 deletions src/bun.js/ipc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub fn decodeIPCMessage(
data: []const u8,
globalThis: *JSC.JSGlobalObject,
) IPCDecodeError!DecodeIPCMessageResult {
JSC.markBinding(@src());
if (data.len < ipcHeaderLength) {
return IPCDecodeError.NotEnoughBytes;
}
Expand Down
3 changes: 3 additions & 0 deletions src/bun.js/javascript.zig
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ pub export fn Bun__Process__send(
globalObject: *JSGlobalObject,
callFrame: *JSC.CallFrame,
) JSValue {
JSC.markBinding(@src());
if (callFrame.argumentsCount() < 1) {
globalObject.throwInvalidArguments("process.send requires at least one argument", .{});
return .zero;
Expand Down Expand Up @@ -2749,6 +2750,7 @@ pub const VirtualMachine = struct {
this: *IPCInstance,
message: IPC.DecodedIPCMessage,
) void {
JSC.markBinding(@src());
switch (message) {
// In future versions we can read this in order to detect version mismatches,
// or disable future optimizations if the subprocess is old.
Expand All @@ -2765,6 +2767,7 @@ pub const VirtualMachine = struct {
}

pub fn handleIPCClose(this: *IPCInstance, _: IPC.Socket) void {
JSC.markBinding(@src());
if (this.globalThis) |global| {
var vm = global.bunVM();
vm.ipc = null;
Expand Down

0 comments on commit 72f0c07

Please sign in to comment.