Merge pull request #1442 from lightpanda-io/disable_debug_crash_report
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled

This commit is contained in:
Pierre Tachoire
2026-01-30 10:14:01 +01:00
committed by GitHub

View File

@@ -2,6 +2,8 @@ const std = @import("std");
const lp = @import("lightpanda"); const lp = @import("lightpanda");
const builtin = @import("builtin"); const builtin = @import("builtin");
const IS_DEBUG = builtin.mode == .Debug;
const abort = std.posix.abort; const abort = std.posix.abort;
// tracks how deep within a panic we're panicling // tracks how deep within a panic we're panicling
@@ -70,6 +72,10 @@ pub noinline fn crash(
} }
fn report(reason: []const u8, begin_addr: usize) !void { fn report(reason: []const u8, begin_addr: usize) !void {
if (comptime IS_DEBUG) {
return;
}
if (@import("telemetry/telemetry.zig").isDisabled()) { if (@import("telemetry/telemetry.zig").isDisabled()) {
return; return;
} }