Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/performance/PerformanceEntry.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 "PerformanceEntry.h"
8
#include "MainThreadUtils.h"
9
#include "mozilla/dom/PerformanceEntryBinding.h"
10
#include "nsIURI.h"
11
12
using namespace mozilla::dom;
13
14
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PerformanceEntry, mParent)
15
16
NS_IMPL_CYCLE_COLLECTING_ADDREF(PerformanceEntry)
17
NS_IMPL_CYCLE_COLLECTING_RELEASE(PerformanceEntry)
18
19
0
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PerformanceEntry)
20
0
  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
21
0
  NS_INTERFACE_MAP_ENTRY(nsISupports)
22
0
NS_INTERFACE_MAP_END
23
24
PerformanceEntry::PerformanceEntry(nsISupports* aParent,
25
                                   const nsAString& aName,
26
                                   const nsAString& aEntryType)
27
: mParent(aParent),
28
  mName(aName),
29
  mEntryType(aEntryType)
30
0
{
31
0
}
32
33
PerformanceEntry::~PerformanceEntry()
34
0
{
35
0
}
36
37
JSObject*
38
PerformanceEntry::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
39
0
{
40
0
  return mozilla::dom::PerformanceEntry_Binding::Wrap(aCx, this, aGivenProto);
41
0
}
42
43
size_t
44
PerformanceEntry::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
45
0
{
46
0
  return mName.SizeOfExcludingThisIfUnshared(aMallocSizeOf) +
47
0
         mEntryType.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
48
0
}
49
50
size_t
51
PerformanceEntry::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
52
0
{
53
0
  return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
54
0
}