mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
committed by
Andreas Kling
parent
7001e0a428
commit
3c3ead5ff4
@@ -592,8 +592,9 @@ void WindowOrWorkerGlobalScopeMixin::run_steps_after_a_timeout_impl(i32 timeout,
|
||||
// https://w3c.github.io/hr-time/#dom-windoworworkerglobalscope-performance
|
||||
JS::NonnullGCPtr<HighResolutionTime::Performance> WindowOrWorkerGlobalScopeMixin::performance()
|
||||
{
|
||||
auto& realm = this_impl().realm();
|
||||
if (!m_performance)
|
||||
m_performance = this_impl().heap().allocate<HighResolutionTime::Performance>(this_impl().realm(), *this);
|
||||
m_performance = this_impl().heap().allocate<HighResolutionTime::Performance>(realm, realm);
|
||||
return JS::NonnullGCPtr { *m_performance };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user