PerformanceEntry.cpp 788 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/Bindings/PerformanceEntryPrototype.h>
  8. #include <LibWeb/PerformanceTimeline/PerformanceEntry.h>
  9. namespace Web::PerformanceTimeline {
  10. PerformanceEntry::PerformanceEntry(JS::Realm& realm, String const& name, HighResolutionTime::DOMHighResTimeStamp start_time, HighResolutionTime::DOMHighResTimeStamp duration)
  11. : Bindings::PlatformObject(realm)
  12. , m_name(name)
  13. , m_start_time(start_time)
  14. , m_duration(duration)
  15. {
  16. }
  17. PerformanceEntry::~PerformanceEntry() = default;
  18. void PerformanceEntry::initialize(JS::Realm& realm)
  19. {
  20. Base::initialize(realm);
  21. WEB_SET_PROTOTYPE_FOR_INTERFACE(PerformanceEntry);
  22. }
  23. }