mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
LibWeb: Implement PerformanceObserver
This commit is contained in:
parent
5055883b9f
commit
af2886449a
Notes:
sideshowbarker
2024-07-16 23:05:02 +09:00
Author: https://github.com/Lubrsi
Commit: af2886449a
Pull-request: https://github.com/SerenityOS/serenity/pull/20760
Reviewed-by: https://github.com/kalenikaliaksandr
22 changed files with 793 additions and 57 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue