zig: prefer .jsUndefined() over .undefined for JSValue (#20332)

This commit is contained in:
Meghan Denny
2025-06-12 12:18:46 -08:00
committed by GitHub
parent d6590c4bfa
commit dedd433cbf
84 changed files with 569 additions and 574 deletions

View File

@@ -1779,9 +1779,9 @@ pub const js_bindings = struct {
}
pub fn jsGetMachOImageZeroOffset(_: *bun.JSC.JSGlobalObject, _: *bun.JSC.CallFrame) bun.JSError!JSValue {
if (!bun.Environment.isMac) return .undefined;
if (!bun.Environment.isMac) return .jsUndefined();
const header = std.c._dyld_get_image_header(0) orelse return .undefined;
const header = std.c._dyld_get_image_header(0) orelse return .jsUndefined();
const base_address = @intFromPtr(header);
const vmaddr_slide = std.c._dyld_get_image_vmaddr_slide(0);
@@ -1793,7 +1793,7 @@ pub const js_bindings = struct {
const ptr: [*]align(1) u64 = @ptrFromInt(0xDEADBEEF);
ptr[0] = 0xDEADBEEF;
std.mem.doNotOptimizeAway(&ptr);
return .undefined;
return .jsUndefined();
}
pub fn jsPanic(_: *JSC.JSGlobalObject, _: *JSC.CallFrame) bun.JSError!JSC.JSValue {