mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
zig: prefer .jsUndefined() over .undefined for JSValue (#20332)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user