Merge pull request #2086 from lightpanda-io/child_node_node_list_arena

Move the NodeList created from a ChildNode to the ChildNode's arena
This commit is contained in:
Karl Seguin
2026-04-07 08:44:21 +08:00
committed by GitHub

View File

@@ -126,8 +126,12 @@ fn versionCheck(self: *ChildNodes, page: *Page) bool {
}
const NodeList = @import("NodeList.zig");
pub fn runtimeGenericWrap(self: *ChildNodes, page: *Page) !*NodeList {
return page._factory.create(NodeList{ ._data = .{ .child_nodes = self } });
pub fn runtimeGenericWrap(self: *ChildNodes, _: *const Page) !*NodeList {
const nl = try self._arena.create(NodeList);
nl.* = .{
._data = .{ .child_nodes = self },
};
return nl;
}
const Iterator = struct {