From 0d6c319f1b2fbdadef1f845cf67d89858c1fe1b4 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Tue, 17 Oct 2023 11:24:35 +0200 Subject: [PATCH] wpt: replace cbk_res with null --- src/main_wpt.zig | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/main_wpt.zig b/src/main_wpt.zig index 4fc0eee3..1eca4cfd 100644 --- a/src/main_wpt.zig +++ b/src/main_wpt.zig @@ -180,11 +180,6 @@ fn runWPT(arena: *std.heap.ArenaAllocator, f: []const u8, loader: *FileLoader) ! try js_env.attachObject(try js_env.getGlobal(), "window", null); var res = jsruntime.JSResult{}; - var cbk_res = jsruntime.JSResult{ - .success = true, - // assume that the return value of the successfull callback is "undefined" - .result = "undefined", - }; const init = \\window.listeners = []; @@ -204,17 +199,17 @@ fn runWPT(arena: *std.heap.ArenaAllocator, f: []const u8, loader: *FileLoader) ! \\}; \\window.removeEventListener = function () {}; ; - try js_env.run(alloc, init, "init", &res, &cbk_res); + try js_env.run(alloc, init, "init", &res, null); if (!res.success) { return res; } // TODO load