diff --git a/src/bun.js/bindings/JSValue.zig b/src/bun.js/bindings/JSValue.zig index 00ad12b6b5..41e7ff86ba 100644 --- a/src/bun.js/bindings/JSValue.zig +++ b/src/bun.js/bindings/JSValue.zig @@ -1106,13 +1106,9 @@ pub const JSValue = enum(i64) { return ret; } - extern fn JSC__JSValue__getClassName(this: JSValue, global: *JSGlobalObject, ret: *ZigString) void; + extern fn JSC__JSValue__getClassName(this: JSValue, global: *JSGlobalObject, ret: *ZigString) bool; pub fn getClassName(this: JSValue, global: *JSGlobalObject, ret: *ZigString) bun.JSError!void { - var scope: bun.JSC.CatchScope = undefined; - scope.init(global, @src(), .assertions_only); - defer scope.deinit(); - JSC__JSValue__getClassName(this, global, ret); - try scope.returnIfException(); + JSC.fromJSHostCallVoid(global, @src(), JSC__JSValue__getClassName, .{ this, global, ret }); } pub inline fn isCell(this: JSValue) bool {