aboutsummaryrefslogtreecommitdiff
path: root/src/panic_handler.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/panic_handler.zig')
-rw-r--r--src/panic_handler.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panic_handler.zig b/src/panic_handler.zig
index 1c3a76e53..ff17ed7d1 100644
--- a/src/panic_handler.zig
+++ b/src/panic_handler.zig
@@ -14,7 +14,7 @@ const Features = @import("./analytics/analytics_thread.zig").Features;
const HTTP = @import("bun").HTTP.AsyncHTTP;
const Report = @import("./report.zig");
-pub fn NewPanicHandler(comptime panic_func: fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace) noreturn) type {
+pub fn NewPanicHandler(comptime panic_func: fn ([]const u8, ?*std.builtin.StackTrace, ?usize) noreturn) type {
return struct {
panic_count: usize = 0,
skip_next_panic: bool = false,
@@ -28,7 +28,7 @@ pub fn NewPanicHandler(comptime panic_func: fn handle_panic(msg: []const u8, err
.log = log,
};
}
- pub inline fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace) noreturn {
+ pub inline fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace, addr: ?usize) noreturn {
// This exists to ensure we flush all buffered output before panicking.
Output.flush();
@@ -37,7 +37,7 @@ pub fn NewPanicHandler(comptime panic_func: fn handle_panic(msg: []const u8, err
Output.disableBuffering();
// // We want to always inline the panic handler so it doesn't show up in the stacktrace.
- @call(.{ .modifier = .always_inline }, panic_func, .{ msg, error_return_type });
+ @call(.always_inline, panic_func, .{ msg, error_return_type, addr });
}
};
}