mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibWeb: Make PerformanceTiming GC-allocated
This commit is contained in:
parent
8c90e08e0b
commit
5f4d4ffe39
6 changed files with 31 additions and 15 deletions
|
@ -10,7 +10,6 @@
|
|||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibWeb/Bindings/Wrappable.h>
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/NavigationTiming/PerformanceTiming.h>
|
||||
|
||||
namespace Web::HighResolutionTime {
|
||||
|
||||
|
@ -23,7 +22,7 @@ public:
|
|||
double now() const { return m_timer.elapsed(); }
|
||||
double time_origin() const;
|
||||
|
||||
JS::GCPtr<NavigationTiming::PerformanceTiming> timing() { return *m_timing; }
|
||||
JS::GCPtr<NavigationTiming::PerformanceTiming> timing();
|
||||
|
||||
private:
|
||||
explicit Performance(HTML::Window&);
|
||||
|
@ -31,10 +30,9 @@ private:
|
|||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
JS::NonnullGCPtr<HTML::Window> m_window;
|
||||
JS::GCPtr<NavigationTiming::PerformanceTiming> m_timing;
|
||||
|
||||
Core::ElapsedTimer m_timer;
|
||||
|
||||
OwnPtr<NavigationTiming::PerformanceTiming> m_timing;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue