Change to debugAssert and make debugAssert run in ASan

This commit is contained in:
Ben Grant
2025-06-13 11:31:34 -07:00
parent 3c860c267a
commit 399d6815ef
2 changed files with 2 additions and 2 deletions

View File

@@ -2012,7 +2012,7 @@ pub const JSValue = enum(i64) {
}
pub fn asNumber(this: JSValue) f64 {
bun.assert(this.isNumber());
bun.debugAssert(this.isNumber());
if (this.isInt32()) {
return @floatFromInt(this.asInt32());
} else {

View File

@@ -2998,7 +2998,7 @@ noinline fn assertionFailureWithMsg(comptime msg: []const u8, args: anytype) nor
/// }
/// ```
pub fn debugAssert(cheap_value_only_plz: bool) callconv(callconv_inline) void {
if (comptime !Environment.isDebug) {
if (comptime !(Environment.isDebug or Environment.enable_asan)) {
return;
}