mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
ensure that records persist in arena
This commit is contained in:
@@ -126,7 +126,7 @@ pub fn disconnect(self: *IntersectionObserver, page: *Page) void {
|
||||
}
|
||||
|
||||
pub fn takeRecords(self: *IntersectionObserver, page: *Page) ![]*IntersectionObserverEntry {
|
||||
const entries = try page.call_arena.dupe(*IntersectionObserverEntry, self._pending_entries.items);
|
||||
const entries = try page.arena.dupe(*IntersectionObserverEntry, self._pending_entries.items);
|
||||
self._pending_entries.clearRetainingCapacity();
|
||||
return entries;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ pub fn disconnect(self: *PerformanceObserver, page: *Page) void {
|
||||
/// Returns the current list of PerformanceEntry objects
|
||||
/// stored in the performance observer, emptying it out.
|
||||
pub fn takeRecords(self: *PerformanceObserver, page: *Page) ![]*Performance.Entry {
|
||||
const records = try page.call_arena.dupe(*Performance.Entry, self._entries.items);
|
||||
const records = try page.arena.dupe(*Performance.Entry, self._entries.items);
|
||||
self._entries.clearRetainingCapacity();
|
||||
return records;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user