mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
Return error if a Page already exists in Session
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
committed by
Pierre Tachoire
parent
bcf4083f9c
commit
df82d25e91
@@ -132,7 +132,8 @@ pub const Page = struct {
|
||||
fn init(
|
||||
alloc: std.mem.Allocator,
|
||||
session: *Session,
|
||||
) Page {
|
||||
) !Page {
|
||||
if (session.page != null) return error.SessionPageExists;
|
||||
var page = Page{
|
||||
.arena = std.heap.ArenaAllocator.init(alloc),
|
||||
.session = session,
|
||||
|
||||
Reference in New Issue
Block a user