mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
on iframe re-navigation, keep pending_loads in sync
This commit is contained in:
@@ -236,7 +236,7 @@ version: usize = 0,
|
|||||||
// ScriptManager, so all scripts just count as 1 pending load.
|
// ScriptManager, so all scripts just count as 1 pending load.
|
||||||
_pending_loads: u32,
|
_pending_loads: u32,
|
||||||
|
|
||||||
_parent_notified: if (IS_DEBUG) bool else void = if (IS_DEBUG) false else {},
|
_parent_notified: bool = false,
|
||||||
|
|
||||||
_type: enum { root, frame }, // only used for logs right now
|
_type: enum { root, frame }, // only used for logs right now
|
||||||
_req_id: u32 = 0,
|
_req_id: u32 = 0,
|
||||||
@@ -753,11 +753,15 @@ fn _documentIsComplete(self: *Page) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn notifyParentLoadComplete(self: *Page) void {
|
fn notifyParentLoadComplete(self: *Page) void {
|
||||||
if (comptime IS_DEBUG) {
|
if (self._parent_notified == true) {
|
||||||
std.debug.assert(self._parent_notified == false);
|
if (comptime IS_DEBUG) {
|
||||||
self._parent_notified = true;
|
std.debug.assert(false);
|
||||||
|
}
|
||||||
|
// shouldn't happen, don't want to crash a release build over it
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self._parent_notified = true;
|
||||||
if (self.parent) |p| {
|
if (self.parent) |p| {
|
||||||
p.iframeCompletedLoading(self.iframe.?);
|
p.iframeCompletedLoading(self.iframe.?);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user