cleanup resolvers

This commit is contained in:
Karl Seguin
2026-01-01 09:57:41 +08:00
parent e6af7d1bd0
commit 01ecd725b8
14 changed files with 83 additions and 124 deletions

View File

@@ -36,7 +36,7 @@ _page: *Page,
_url: []const u8,
_buf: std.ArrayList(u8),
_response: *Response,
_resolver: js.PersistentPromiseResolver,
_resolver: js.PromiseResolver,
pub const Input = Request.Input;
pub const InitOpts = Request.InitOpts;
@@ -49,7 +49,7 @@ pub fn init(input: Input, options: ?InitOpts, page: *Page) !js.Promise {
._page = page,
._buf = .empty,
._url = try page.arena.dupe(u8, request._url),
._resolver = try page.js.createPromiseResolver(.page),
._resolver = try page.js.createPromiseResolver().persist(),
._response = try Response.init(null, .{ .status = 0 }, page),
};