From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/page/PerformanceMark.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'Source/WebCore/page/PerformanceMark.h') diff --git a/Source/WebCore/page/PerformanceMark.h b/Source/WebCore/page/PerformanceMark.h index 64b39abfd..528ba1996 100644 --- a/Source/WebCore/page/PerformanceMark.h +++ b/Source/WebCore/page/PerformanceMark.h @@ -23,30 +23,34 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PerformanceMark_h -#define PerformanceMark_h +#pragma once -#if ENABLE(USER_TIMING) +#if ENABLE(WEB_TIMING) #include "PerformanceEntry.h" -#include #include namespace WebCore { -class PerformanceMark : public PerformanceEntry { +class PerformanceMark final : public PerformanceEntry { public: - static PassRefPtr create(const String& name, double startTime) { return adoptRef(new PerformanceMark(name, startTime)); } + static Ref create(const String& name, double startTime) { return adoptRef(*new PerformanceMark(name, startTime)); } - virtual bool isMark() { return true; } + bool isMark() const override { return true; } private: - PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, startTime) { } + PerformanceMark(const String& name, double startTime) + : PerformanceEntry(PerformanceEntry::Type::Mark, name, ASCIILiteral("mark"), startTime, startTime) + { + } + ~PerformanceMark() { } }; -} +} // namespace WebCore -#endif // ENABLE(USER_TIMING) +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceMark) + static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isMark(); } +SPECIALIZE_TYPE_TRAITS_END() -#endif // !defined(PerformanceMark_h) +#endif // ENABLE(WEB_TIMING) -- cgit v1.2.1