mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
zig: prefer .jsUndefined() over .undefined for JSValue (#20332)
This commit is contained in:
@@ -60,7 +60,7 @@ pub fn sendHelperChild(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFram
|
||||
const arguments_ = callframe_.arguments_old(1).slice();
|
||||
const ex = arguments_[0];
|
||||
Process__emitErrorEvent(globalThis_, ex.toError() orelse ex);
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn onInternalMessageChild(globalThis: *JSC.JSGlobalObject, callframe: *JSC.C
|
||||
child_singleton.worker = .create(arguments[0], globalThis);
|
||||
child_singleton.cb = .create(arguments[1], globalThis);
|
||||
try child_singleton.flush(globalThis);
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
|
||||
pub fn handleInternalMessageChild(globalThis: *JSC.JSGlobalObject, message: JSC.JSValue) bun.JSError!void {
|
||||
@@ -216,11 +216,11 @@ pub fn sendHelperPrimary(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFr
|
||||
pub fn onInternalMessagePrimary(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {
|
||||
const arguments = callframe.arguments_old(3).ptr;
|
||||
const subprocess = arguments[0].as(bun.JSC.Subprocess).?;
|
||||
const ipc_data = subprocess.ipc() orelse return .undefined;
|
||||
const ipc_data = subprocess.ipc() orelse return .jsUndefined();
|
||||
// TODO: remove these strongs.
|
||||
ipc_data.internal_msg_queue.worker = .create(arguments[1], globalThis);
|
||||
ipc_data.internal_msg_queue.cb = .create(arguments[2], globalThis);
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
|
||||
pub fn handleInternalMessagePrimary(globalThis: *JSC.JSGlobalObject, subprocess: *JSC.Subprocess, message: JSC.JSValue) bun.JSError!void {
|
||||
@@ -275,7 +275,7 @@ pub fn setRef(globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.
|
||||
} else {
|
||||
vm.channel_ref.unref(vm);
|
||||
}
|
||||
return .undefined;
|
||||
return .jsUndefined();
|
||||
}
|
||||
|
||||
export fn Bun__refChannelUnlessOverridden(globalObject: *JSC.JSGlobalObject) void {
|
||||
|
||||
Reference in New Issue
Block a user