fix CI: store list pointer on AbstractRange to avoid Page type mismatch

The bridge.finalizer resolves Page through its own module graph, which
can differ from Range.zig's import in release builds. Store a pointer
to the live_ranges list directly on AbstractRange so deinit can remove
without accessing Page fields.
This commit is contained in:
egrs
2026-03-11 07:58:31 +01:00
parent 625d424199
commit 056b8bb536
3 changed files with 4 additions and 2 deletions

View File

@@ -282,6 +282,7 @@ pub fn abstractRange(self: *Factory, child: anytype, page: *Page) !*@TypeOf(chil
._start_container = doc,
};
chain.setLeaf(1, child);
abstract_range._live_ranges = &page._live_ranges;
page._live_ranges.append(&abstract_range._range_link);
return chain.get(1);
}

View File

@@ -35,6 +35,7 @@ _start_container: *Node,
// Intrusive linked list node for tracking live ranges on the Page.
_range_link: std.DoublyLinkedList.Node = .{},
_live_ranges: *std.DoublyLinkedList = undefined,
pub const Type = union(enum) {
range: *Range,

View File

@@ -680,8 +680,8 @@ fn getContainerElement(self: *const Range) ?*Node.Element {
return parent.is(Node.Element);
}
pub fn deinit(self: *Range, _: bool, page: *Page) void {
page._live_ranges.remove(&self._proto._range_link);
pub fn deinit(self: *Range, _: bool, _: *Page) void {
self._proto._live_ranges.remove(&self._proto._range_link);
}
pub const JsApi = struct {