mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
xhr: fix unit tests for 0.12.1
This commit is contained in:
@@ -240,7 +240,7 @@ pub fn testExecFn(
|
||||
try checkCases(js_env, &remove);
|
||||
}
|
||||
|
||||
pub const event_handler = struct {
|
||||
pub const EventHandler = struct {
|
||||
fn handle(event: ?*parser.Event, data: ?*anyopaque) callconv(.C) void {
|
||||
if (data) |d| {
|
||||
const func = parser.event_handler_cbk(d);
|
||||
@@ -252,9 +252,9 @@ pub const event_handler = struct {
|
||||
if (event) |evt| {
|
||||
func.trycall(.{
|
||||
Event.toInterface(evt) catch unreachable,
|
||||
}, &res) catch {};
|
||||
}, &res) catch |e| log.err("event handler error: {any}", .{e});
|
||||
} else {
|
||||
func.trycall(.{event}, &res) catch {};
|
||||
func.trycall(.{event}, &res) catch |e| log.err("event handler error: {any}", .{e});
|
||||
}
|
||||
|
||||
// in case of function error, we log the result and the trace.
|
||||
|
||||
Reference in New Issue
Block a user