mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 17:46:32 -04:00
acquire reference on document font
This commit is contained in:
@@ -385,7 +385,12 @@ pub fn deinit(self: *Page, abort_http: bool) void {
|
||||
observer.releaseRef(session);
|
||||
}
|
||||
|
||||
self.window._document._selection.releaseRef(session);
|
||||
var document = self.window._document;
|
||||
document._selection.releaseRef(session);
|
||||
|
||||
if (document._fonts) |f| {
|
||||
f.releaseRef(session);
|
||||
}
|
||||
}
|
||||
|
||||
session.browser.env.destroyContext(self.js);
|
||||
|
||||
@@ -454,6 +454,7 @@ pub fn getFonts(self: *Document, page: *Page) !*FontFaceSet {
|
||||
return fonts;
|
||||
}
|
||||
const fonts = try FontFaceSet.init(page);
|
||||
fonts.acquireRef();
|
||||
self._fonts = fonts;
|
||||
return fonts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user