ladybird/Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h
Andreas Kling bfd354492e LibWeb: Put most LibWeb GC objects in type-specific heap blocks
With this change, we now have ~1200 CellAllocators across both LibJS and
LibWeb in a normal WebContent instance.

This gives us a minimum heap size of 4.7 MiB in the scenario where we
only have one cell allocated per type. Of course, in practice there will
be many more of each type, so the effective overhead is quite a bit
smaller than that in practice.

I left a few types unconverted to this mechanism because I got tired of
doing this. :^)
2023-11-19 22:00:48 +01:00

54 lines
1.5 KiB
C++

/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/HTML/Window.h>
namespace Web::NavigationTiming {
class PerformanceTiming final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(PerformanceTiming, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(PerformanceTiming);
public:
using AllowOwnPtr = TrueType;
~PerformanceTiming();
u64 navigation_start() { return 0; }
u64 unload_event_start() { return 0; }
u64 unload_event_end() { return 0; }
u64 redirect_start() { return 0; }
u64 redirect_end() { return 0; }
u64 fetch_start() { return 0; }
u64 domain_lookup_start() { return 0; }
u64 domain_lookup_end() { return 0; }
u64 connect_start() { return 0; }
u64 connect_end() { return 0; }
u64 secure_connection_start() { return 0; }
u64 request_start() { return 0; }
u64 response_start() { return 0; }
u64 response_end() { return 0; }
u64 dom_loading() { return 0; }
u64 dom_interactive() { return 0; }
u64 dom_content_loaded_event_start() { return 0; }
u64 dom_content_loaded_event_end() { return 0; }
u64 dom_complete() { return 0; }
u64 load_event_start() { return 0; }
u64 load_event_end() { return 0; }
private:
explicit PerformanceTiming(HTML::Window&);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
JS::GCPtr<HTML::Window> m_window;
};
}