/src/mozilla-central/dom/performance/PerformanceMeasure.cpp
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #include "PerformanceMeasure.h" |
8 | | #include "MainThreadUtils.h" |
9 | | #include "mozilla/dom/PerformanceMeasureBinding.h" |
10 | | |
11 | | using namespace mozilla::dom; |
12 | | |
13 | | PerformanceMeasure::PerformanceMeasure(nsISupports* aParent, |
14 | | const nsAString& aName, |
15 | | DOMHighResTimeStamp aStartTime, |
16 | | DOMHighResTimeStamp aEndTime) |
17 | | : PerformanceEntry(aParent, aName, NS_LITERAL_STRING("measure")), |
18 | | mStartTime(aStartTime), |
19 | | mDuration(aEndTime - aStartTime) |
20 | 0 | { |
21 | 0 | } |
22 | | |
23 | | PerformanceMeasure::~PerformanceMeasure() |
24 | | { |
25 | | } |
26 | | |
27 | | JSObject* |
28 | | PerformanceMeasure::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
29 | 0 | { |
30 | 0 | return PerformanceMeasure_Binding::Wrap(aCx, this, aGivenProto); |
31 | 0 | } |
32 | | |
33 | | size_t |
34 | | PerformanceMeasure::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const |
35 | 0 | { |
36 | 0 | return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf); |
37 | 0 | } |