diff --git a/src/browser/tests/mutation_observer/mutation_observer.html b/src/browser/tests/mutation_observer/mutation_observer.html index 76b95bb7..b80c37c2 100644 --- a/src/browser/tests/mutation_observer/mutation_observer.html +++ b/src/browser/tests/mutation_observer/mutation_observer.html @@ -112,3 +112,28 @@ }); }); + + diff --git a/src/browser/tests/performance_observer/performance_observer.html b/src/browser/tests/performance_observer/performance_observer.html index 11c82f23..f0d48ea9 100644 --- a/src/browser/tests/performance_observer/performance_observer.html +++ b/src/browser/tests/performance_observer/performance_observer.html @@ -36,3 +36,31 @@ performance.mark("operationEnd", { startTime: 34.0 }); } + + diff --git a/src/browser/webapi/PerformanceObserver.zig b/src/browser/webapi/PerformanceObserver.zig index c23a559d..2da5ab3e 100644 --- a/src/browser/webapi/PerformanceObserver.zig +++ b/src/browser/webapi/PerformanceObserver.zig @@ -126,7 +126,9 @@ 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); + // Use page.arena instead of call_arena because this slice is wrapped in EntryList + // and may be accessed later. + const records = try page.arena.dupe(*Performance.Entry, self._entries.items); self._entries.clearRetainingCapacity(); return records; }