mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibWeb: Don't store WindowOrWorkerGlobalScopeMixin in Performance
It wasn't used anyways, instead preferring to do dynamic_casts in every method. Let's keep doing that, but move it into a helper function.
This commit is contained in:
parent
7001e0a428
commit
3c3ead5ff4
Notes:
sideshowbarker
2024-07-16 17:12:03 +09:00
Author: https://github.com/mattco98
Commit: 3c3ead5ff4
Pull-request: https://github.com/SerenityOS/serenity/pull/23861
Reviewed-by: https://github.com/awesomekling
5 changed files with 35 additions and 56 deletions
|
@ -37,7 +37,10 @@ public:
|
|||
WebIDL::ExceptionOr<Vector<JS::Handle<PerformanceTimeline::PerformanceEntry>>> get_entries_by_name(String const& name, Optional<String> type) const;
|
||||
|
||||
private:
|
||||
explicit Performance(HTML::WindowOrWorkerGlobalScopeMixin&);
|
||||
explicit Performance(JS::Realm&);
|
||||
|
||||
HTML::WindowOrWorkerGlobalScopeMixin& window_or_worker();
|
||||
HTML::WindowOrWorkerGlobalScopeMixin const& window_or_worker() const;
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
@ -45,7 +48,6 @@ private:
|
|||
WebIDL::ExceptionOr<HighResolutionTime::DOMHighResTimeStamp> convert_name_to_timestamp(JS::Realm& realm, String const& name);
|
||||
WebIDL::ExceptionOr<HighResolutionTime::DOMHighResTimeStamp> convert_mark_to_timestamp(JS::Realm& realm, Variant<String, HighResolutionTime::DOMHighResTimeStamp> mark);
|
||||
|
||||
JS::NonnullGCPtr<HTML::WindowOrWorkerGlobalScopeMixin> m_window_or_worker;
|
||||
JS::GCPtr<NavigationTiming::PerformanceTiming> m_timing;
|
||||
|
||||
Core::ElapsedTimer m_timer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue