1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

LibWeb: Implement PerformanceObserver

This commit is contained in:
Luke Wilde 2023-08-25 01:26:47 +01:00 committed by Andreas Kling
parent 5055883b9f
commit af2886449a
22 changed files with 793 additions and 57 deletions

View file

@ -14,7 +14,7 @@ namespace Web::PerformanceTimeline {
struct PerformanceEntryTuple {
// https://www.w3.org/TR/performance-timeline/#dfn-performance-entry-buffer
// A performance entry buffer to store PerformanceEntry objects, that is initially empty.
Vector<JS::Handle<PerformanceEntry>> performance_entry_buffer;
Vector<JS::NonnullGCPtr<PerformanceEntry>> performance_entry_buffer;
// https://www.w3.org/TR/performance-timeline/#dfn-maxbuffersize
// An integer maxBufferSize, initialized to the registry value for this entry type.
@ -45,6 +45,12 @@ struct PerformanceEntryTuple {
// 4. Return true.
return true;
}
void visit_edges(JS::Cell::Visitor& visitor)
{
for (auto& entry : performance_entry_buffer)
visitor.visit(entry);
}
};
}