1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_performancemark_h___
8 #define mozilla_dom_performancemark_h___
10 #include "mozilla/dom/PerformanceEntry.h"
15 // http://www.w3.org/TR/user-timing/#performancemark
16 class PerformanceMark final
: public PerformanceEntry
{
18 PerformanceMark(nsISupports
* aParent
, const nsAString
& aName
,
19 DOMHighResTimeStamp aStartTime
);
21 virtual JSObject
* WrapObject(JSContext
* aCx
,
22 JS::Handle
<JSObject
*> aGivenProto
) override
;
24 virtual DOMHighResTimeStamp
StartTime() const override
{ return mStartTime
; }
26 size_t SizeOfIncludingThis(
27 mozilla::MallocSizeOf aMallocSizeOf
) const override
;
30 virtual ~PerformanceMark();
31 DOMHighResTimeStamp mStartTime
;
35 } // namespace mozilla
37 #endif /* mozilla_dom_performancemark_h___ */