mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-15 15:58:57 +00:00
Don't break wait on scheduler callback error
Allow recursive parsing
This commit is contained in:
@@ -629,8 +629,7 @@ fn _wait(self: *Page, wait_ms: u32) !Session.WaitResult {
|
||||
|
||||
if (try_catch.hasCaught()) {
|
||||
const msg = (try try_catch.err(self.arena)) orelse "unknown";
|
||||
log.warn(.js, "page wait", .{ .err = msg, .src = "scheduler" });
|
||||
return error.JsError;
|
||||
log.info(.js, "page wait", .{ .err = msg, .src = "scheduler" });
|
||||
}
|
||||
|
||||
const http_active = http_client.active;
|
||||
@@ -1648,9 +1647,9 @@ pub fn childListChange(
|
||||
|
||||
// TODO: optimize and cleanup, this is called a lot (e.g., innerHTML = '')
|
||||
pub fn parseHtmlAsChildren(self: *Page, node: *Node, html: []const u8) !void {
|
||||
std.debug.assert(self._parse_mode == .document);
|
||||
const previous_parse_mode = self._parse_mode;
|
||||
self._parse_mode = .fragment;
|
||||
defer self._parse_mode = .document;
|
||||
defer self._parse_mode = previous_parse_mode;
|
||||
|
||||
var parser = Parser.init(self.call_arena, node, self);
|
||||
parser.parseFragment(html);
|
||||
|
||||
@@ -67,8 +67,8 @@ pub fn init(input: Input, options: ?RequestInit, page: *Page) !js.Promise {
|
||||
.url = request._url,
|
||||
.method = .GET,
|
||||
.headers = headers,
|
||||
.cookie_jar = &page._session.cookie_jar,
|
||||
.resource_type = .fetch,
|
||||
.cookie_jar = &page._session.cookie_jar,
|
||||
.header_callback = httpHeaderDoneCallback,
|
||||
.data_callback = httpDataCallback,
|
||||
.done_callback = httpDoneCallback,
|
||||
|
||||
Reference in New Issue
Block a user